LR Initial Publish

Dependencies:   X_NUCLEO_IKS01A2 driver_mbed_TH02 mbed LoRaWAN-lib-v1_0_1 SX1272Lib

Fork of Training-Aug2018-SX1272-X-NUCLEO-IKS01A2 by Uttam Bhat

Revision:
8:7ddaacb6dda6
Parent:
2:19dd7bfcacf7
Child:
10:bba416e2c3e1
--- a/board/board.cpp	Sat Nov 25 23:07:40 2017 +0000
+++ b/board/board.cpp	Tue Nov 28 07:30:45 2017 +0000
@@ -54,13 +54,16 @@
 
 void BoardGetDevEUI( uint8_t *id )
 {
-    uint32_t *pDevEuiHWord = ( uint32_t* )&id[4];
+    uint32_t DevEuiHWord = 0;
 
-    if( *pDevEuiHWord == 0 )
+    if( ( id[7] == 0 ) && ( id[6] == 0 ) && ( id[5] == 0 ) && ( id[4] == 0 ) )
     {        
-        *pDevEuiHWord = BoardGetRandomSeed( );
-    }
-    
+        DevEuiHWord = BoardGetRandomSeed( );
+        id[7] = (DevEuiHWord >> 3) & 0xFF;
+        id[6] = (DevEuiHWord >> 2) & 0xFF;
+        id[5] = (DevEuiHWord >> 1) & 0xFF;
+        id[4] = (DevEuiHWord >> 0) & 0xFF;
+    }    
 }
 
 void BoardGetUniqueId( uint8_t *id )