1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/openwsn/patches/eui64.c.patch

40 lines
1.2 KiB
Diff
Raw Normal View History

*** stock_iot-lab_M3/openwsn/eui64.c Thu Apr 24 11:19:39 2014
--- riot-openwsn-wip/openwsn/eui64.c Thu Apr 24 16:53:30 2014
***************
*** 0 ****
--- 1,34 ----
+ /**
+ \brief iot-lab_M3 definition of the "eui64" bsp module.
+
+ \author Alaeddine Weslati <alaeddine.weslati@inria.fr>, January 2014.
+ */
+
+ #include "string.h"
+ #include "eui64.h"
+
+ //=========================== defines =========================================
+ // stm32f103rey, 96-bit unique ID address
+ #define UNIQUE_ID_BASE_ADDRESS 0x1FFFF7E8
+
+ //=========================== variables =======================================
+
+ const uint8_t const *uid = (const uint8_t *const) UNIQUE_ID_BASE_ADDRESS;
+
+ //=========================== prototypes ======================================
+
+ //=========================== public ==========================================
+
+ void eui64_get(uint8_t* addressToWrite)
+ {
+ addressToWrite[0] = uid[0];
+ addressToWrite[1] = uid[1];
+ addressToWrite[2] = uid[2];
+ addressToWrite[3] = uid[3];
+ addressToWrite[4] = uid[4];
+ addressToWrite[5] = uid[5];
+ addressToWrite[6] = uid[6];
+ addressToWrite[7] = uid[7];
+ }
+
+ //=========================== private =========================================