45 #include <ti/devices/DeviceFamily.h> 46 #include DeviceFamily_constructPath(inc/hw_memmap.h) 47 #include DeviceFamily_constructPath(inc/hw_fcfg1.h) 48 #include DeviceFamily_constructPath(inc/hw_ccfg.h) 53 #define IEEE_ADDR_HARDCODED IEEE_ADDR_CONF_HARDCODED 54 #define IEEE_ADDR_ADDRESS IEEE_ADDR_CONF_ADDRESS 56 #define IEEE_MAC_PRIMARY_ADDRESS (FCFG1_BASE + FCFG1_O_MAC_15_4_0) 57 #define IEEE_MAC_SECONDARY_ADDRESS (CCFG_BASE + CCFG_O_IEEE_MAC_0) 62 if(len > LINKADDR_SIZE) {
66 if(IEEE_ADDR_HARDCODED) {
67 const uint8_t ieee_addr_hc[LINKADDR_SIZE] = IEEE_ADDR_ADDRESS;
69 memcpy(dst, &ieee_addr_hc[LINKADDR_SIZE - len], len);
73 volatile const uint8_t *
const primary = (uint8_t *)IEEE_MAC_PRIMARY_ADDRESS;
74 volatile const uint8_t *
const secondary = (uint8_t *)IEEE_MAC_SECONDARY_ADDRESS;
77 volatile const uint8_t *ieee_addr = primary;
86 for(i = 0; i < len; i++) {
87 if(secondary[i] != 0xFF) {
89 ieee_addr = secondary;
98 for(i = 0; i < len; i++) {
99 dst[i] = ieee_addr[len - 1 - i];
103 #ifdef IEEE_ADDR_NODE_ID 104 dst[len - 1] = (IEEE_ADDR_NODE_ID >> 0) & 0xFF;
105 dst[len - 2] = (IEEE_ADDR_NODE_ID >> 8) & 0xFF;
Header file for the link-layer address representation
void ieee_addr_cpy_to(uint8_t *dst, uint8_t len)
Copy the node's IEEE address to a destination memory area.
Header file for the CC13xx/CC26xx IEEE address driver.