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

kw2xrf: Change long address get to big endian

This change ensures that the endianess returned by the get_addr_long
is consistent with the endianess of the get_addr_short
This commit is contained in:
Koen Zandberg 2018-12-01 17:47:32 +01:00
parent b291c638d3
commit b044e83a44
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -25,6 +25,7 @@
#include "kw2xrf_reg.h"
#include "kw2xrf_getset.h"
#include "kw2xrf_intern.h"
#include "byteorder.h"
#define ENABLE_DEBUG (0)
#include "debug.h"
@ -303,7 +304,8 @@ uint64_t kw2xrf_get_addr_long(kw2xrf_t *dev)
kw2xrf_read_iregs(dev, MKW2XDMI_MACLONGADDRS0_0, ap,
IEEE802154_LONG_ADDRESS_LEN);
return addr;
/* Address is always read as little endian and API specifies big endian */
return byteorder_swapll(addr);
}
int8_t kw2xrf_get_cca_threshold(kw2xrf_t *dev)