CC2538: add secondary location to ieee address

The CC2538 currently has two addressing options: a hardcoded address set
at compile time or the address stored in primary address section of the
info page. This commit adds the option to choose the secondary location
of the ieee address from the info page, or any memory address.

To use, define `IEEE_ADDR_CONF_USE_SECONDARY_LOCATION` in `project-conf.h`
or similar.

For example:

    #define IEEE_ADDR_CONF_USE_SECONDARY_LOCATION 1
This commit is contained in:
Brad Campbell 2014-03-05 18:19:15 -05:00
parent 3140f36356
commit d14f0d5eed
4 changed files with 24 additions and 2 deletions

View file

@ -52,7 +52,7 @@ ieee_addr_cpy_to(uint8_t *dst, uint8_t len)
/* Reading from Info Page, we need to invert byte order */
int i;
for(i = 0; i < len; i++) {
dst[i] = ((uint8_t *)IEEE_ADDR_LOCATION_PRIMARY)[len - 1 - i];
dst[i] = ((uint8_t *)IEEE_ADDR_LOCATION)[len - 1 - i];
}
}