44#include "ieee-addr-id.h"
46#include <ti/devices/DeviceFamily.h>
47#include DeviceFamily_constructPath(inc/hw_memmap.h)
48#include DeviceFamily_constructPath(inc/hw_fcfg1.h)
49#include DeviceFamily_constructPath(inc/hw_ccfg.h)
54#define IEEE_ADDR_HARDCODED IEEE_ADDR_CONF_HARDCODED
55#define IEEE_ADDR_ADDRESS IEEE_ADDR_CONF_ADDRESS
57#define IEEE_MAC_PRIMARY_ADDRESS (FCFG1_BASE + FCFG1_O_MAC_15_4_0)
58#define IEEE_MAC_SECONDARY_ADDRESS (CCFG_BASE + CCFG_O_IEEE_MAC_0)
63 if(len > LINKADDR_SIZE) {
67 if(IEEE_ADDR_HARDCODED) {
68 const uint8_t ieee_addr_hc[LINKADDR_SIZE] = IEEE_ADDR_ADDRESS;
70 memcpy(dst, &ieee_addr_hc[LINKADDR_SIZE - len], len);
74 volatile const uint8_t *
const primary = (uint8_t *)IEEE_MAC_PRIMARY_ADDRESS;
75 volatile const uint8_t *
const secondary = (uint8_t *)IEEE_MAC_SECONDARY_ADDRESS;
78 volatile const uint8_t *ieee_addr = primary;
87 for(i = 0; i < len; i++) {
88 if(secondary[i] != 0xFF) {
90 ieee_addr = secondary;
99 for(i = 0; i < len; i++) {
100 dst[i] = ieee_addr[len - 1 - i];
104#ifdef IEEE_ADDR_NODE_ID
105 dst[len - 1] = (IEEE_ADDR_NODE_ID >> 0) & 0xFF;
106 dst[len - 2] = (IEEE_ADDR_NODE_ID >> 8) & 0xFF;
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 link-layer address representation.
Header file for the CC13xx/CC26xx IEEE address driver.