Skip to content

Commit

Permalink
[RENAME]drivers/kw2xrf: improve default short address V2
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterKietzmann committed May 25, 2016
1 parent a0133c2 commit 740e010
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/kw2xrf/kw2xrf.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,9 @@ int kw2xrf_init(kw2xrf_t *dev, spi_t spi, spi_speed_t spi_speed,
#if CPUID_LEN > IEEE802154_LONG_ADDRESS_LEN
for (int i = IEEE802154_LONG_ADDRESS_LEN; i < CPUID_LEN; i++) {
cpuid[i & 0x07] ^= cpuid[i];
}
#endif

#if CPUID_LEN > IEEE802154_SHORT_ADDRESS_LEN
for (int i = 0; i < CPUID_LEN; i++) {
addr_short ^= (uint16_t)(cpuid[i] << ((i & 0x01) * 8));
}

#endif
/* make sure we mark the address as non-multicast and not globally unique */
cpuid[0] &= ~(0x01);
Expand Down

0 comments on commit 740e010

Please sign in to comment.