@@ -29,18 +29,18 @@ Author:
29
29
30
30
// This EUI must be in little-endian format, so least-significant-byte
31
31
// first. This corresponds to 0x0000000000000001
32
- static const u1_t PROGMEM APPEUI[8 ]= { 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
33
- void os_getArtEui (u1_t * buf) { memcpy_P (buf, APPEUI , 8 );}
32
+ // static const u1_t PROGMEM APPEUI[8]= { 1, 0, 0, 0, 0, 0, 0, 0 };
33
+ void os_getArtEui (u1_t * buf) { memset (buf, 0 , 8 ); buf[ 0 ] = 1 ; }
34
34
35
35
// This should also be in little endian format, see above.
36
36
// This corresponds to 0x0000000000000001
37
- static const u1_t PROGMEM DEVEUI[8 ]= { 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 };
38
- void os_getDevEui (u1_t * buf) { memcpy_P (buf, DEVEUI , 8 );}
37
+ // static const u1_t PROGMEM DEVEUI[8]= { 1, 0, 0, 0, 0, 0, 0, 0 };
38
+ void os_getDevEui (u1_t * buf) { memset (buf, 0 , 8 ); buf[ 0 ] = 1 ; }
39
39
40
40
// This key should be in big endian format (or, since it is not really a
41
41
// number but a block of memory, endianness does not really apply).
42
- static const u1_t PROGMEM APPKEY[16 ] = { 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 2 };
43
- void os_getDevKey (u1_t * buf) { memcpy_P (buf, APPKEY , 16 );}
42
+ // static const u1_t PROGMEM APPKEY[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 };
43
+ void os_getDevKey (u1_t * buf) { memset (buf, 0 , 16 ); buf[ 15 ] = 2 ; }
44
44
45
45
// this data must be kept short -- max is 11 bytes for US DR0
46
46
static uint8_t mydata[] = { 0xCA , 0xFE , 0xF0 , 0x0D };
0 commit comments