Skip to content
Snippets Groups Projects
Unverified Commit 666e8347 authored by Koen Zandberg's avatar Koen Zandberg
Browse files

kw2xrf: Fetch short addr from device

This change modifies the kw2xrf_get_addr_short function to retrieve the
short address from the device and not from netdev
parent b044e83a
No related branches found
No related tags found
No related merge requests found
......@@ -293,7 +293,11 @@ void kw2xrf_set_addr_long(kw2xrf_t *dev, uint64_t addr)
uint16_t kw2xrf_get_addr_short(kw2xrf_t *dev)
{
return (dev->netdev.short_addr[0] << 8) | dev->netdev.short_addr[1];
uint16_t addr;
uint8_t *ap = (uint8_t *)(&addr);
kw2xrf_read_iregs(dev, MKW2XDMI_MACSHORTADDRS0_LSB, ap,
IEEE802154_SHORT_ADDRESS_LEN);
return byteorder_swaps(addr);
}
uint64_t kw2xrf_get_addr_long(kw2xrf_t *dev)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment