things4u / LoRa-LMIC-1.51

Port of LMIC-1.5 library tp Atmega 328 and ESP6822, including alternative AES encription library
81 stars 42 forks source link

msbf4_read corrupts certain Device Addresses #9

Open mikenz opened 8 years ago

mikenz commented 8 years ago

Just enter it directly as a u4_t.

eg { 0x01, 0x58, 0xA5, 0xA2 } would end up as FFFFA5A2

mikenz commented 8 years ago

Alternatively here's a correct msbf4_read for use in the .ino files #define msbf4_read(p) (((u4_t)p[0] << 8 | p[1]) << 8 | p[2]) << 8 | p[3]