You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ju...@apache.org on 2017/05/10 10:58:25 UTC

[1/2] incubator-mynewt-core git commit: bsp: wifire: Implement hal_bsp_hw_id

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/master 850b9cb98 -> 21d4cf079


bsp: wifire: Implement hal_bsp_hw_id

This function reads the DEVID register which
contains the revision (upper 4 bits) and the
device id (lower 28 bits).

Signed-off-by: Francois Berder <fb...@outlook.fr>


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/e278c351
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/e278c351
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/e278c351

Branch: refs/heads/master
Commit: e278c351183310a3883f5255c856b6184e6d9cec
Parents: debf64f
Author: Francois Berder <fb...@outlook.fr>
Authored: Mon May 8 11:31:17 2017 +0200
Committer: Francois Berder <fb...@outlook.fr>
Committed: Mon May 8 11:34:13 2017 +0200

----------------------------------------------------------------------
 hw/bsp/pic32mz2048_wi-fire/src/hal_bsp.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/e278c351/hw/bsp/pic32mz2048_wi-fire/src/hal_bsp.c
----------------------------------------------------------------------
diff --git a/hw/bsp/pic32mz2048_wi-fire/src/hal_bsp.c b/hw/bsp/pic32mz2048_wi-fire/src/hal_bsp.c
index 87fcfa6..ae78a1d 100644
--- a/hw/bsp/pic32mz2048_wi-fire/src/hal_bsp.c
+++ b/hw/bsp/pic32mz2048_wi-fire/src/hal_bsp.c
@@ -19,9 +19,21 @@
 #include "hal/hal_bsp.h"
 #include "bsp/bsp.h"
 #include <assert.h>
+#include <xc.h>
 
 const struct hal_flash *
 hal_bsp_flash_dev(uint8_t id)
 {
     return 0;
 }
+
+int
+hal_bsp_hw_id(uint8_t *id, int max_len)
+{
+    if (max_len > sizeof(DEVID)) {
+        max_len = sizeof(DEVID);
+    }
+
+    memcpy(id, &DEVID, max_len);
+    return max_len;
+}
\ No newline at end of file


[2/2] incubator-mynewt-core git commit: This closes pull request #261.

Posted by ju...@apache.org.
This closes pull request #261.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/21d4cf07
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/21d4cf07
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/21d4cf07

Branch: refs/heads/master
Commit: 21d4cf079dceab478c6d8792b18ee13a80a8f0b2
Parents: 850b9cb e278c35
Author: julian <ju...@imgtec.com>
Authored: Wed May 10 11:57:11 2017 +0100
Committer: julian <ju...@imgtec.com>
Committed: Wed May 10 11:57:11 2017 +0100

----------------------------------------------------------------------
 hw/bsp/pic32mz2048_wi-fire/src/hal_bsp.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------