Skip to content
Snippets Groups Projects
Commit 53625569 authored by Martine Lenders's avatar Martine Lenders
Browse files

cc110x: take whole CPU ID for hardware address generation

parent 6aacfa8a
No related branches found
No related tags found
No related merge requests found
...@@ -88,10 +88,13 @@ int cc110x_setup(cc110x_t *dev, const cc110x_params_t *params) ...@@ -88,10 +88,13 @@ int cc110x_setup(cc110x_t *dev, const cc110x_params_t *params)
/* set default node id */ /* set default node id */
#ifdef CPUID_LEN #ifdef CPUID_LEN
if (CPUID_LEN>0) { if (CPUID_LEN > 0) {
char cpuid[CPUID_LEN]; char cpuid[CPUID_LEN];
cpuid_get(cpuid); 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 #endif
......
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