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

cc110x: take whole CPU ID for hardware address generation

This commit is contained in:
Martine Lenders 2016-03-26 19:05:19 +01:00
parent 6aacfa8a42
commit 536255696e

View File

@ -88,10 +88,13 @@ int cc110x_setup(cc110x_t *dev, const cc110x_params_t *params)
/* set default node id */
#ifdef CPUID_LEN
if (CPUID_LEN>0) {
if (CPUID_LEN > 0) {
char cpuid[CPUID_LEN];
cpuid_get(cpuid);
cc110x_set_address(dev, (uint8_t) cpuid[CPUID_LEN-1]);
for (int i = 1; i < CPUID_LEN; i++) {
cpuid[0] ^= cpuid[i]
}
cc110x_set_address(dev, (uint8_t) cpuid[0]);
}
#endif