macAddrLsb = HWREGB(FCFG1_BASE + FCFG1_O_MAC_15_4_0); 编译显示FCFG1_O_MAC_15_4_0未定义,FCFG1_BASE 在hw_memmap.h可以找到定义,
FCFG1_O_MAC_15_4_0在hw_fcfg1.h里面。为什么会找不到这个定义;
就是用的提供的源代码,然后加了个读取mac地址的代码
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
macAddrLsb = HWREGB(FCFG1_BASE + FCFG1_O_MAC_15_4_0); 编译显示FCFG1_O_MAC_15_4_0未定义,FCFG1_BASE 在hw_memmap.h可以找到定义,
FCFG1_O_MAC_15_4_0在hw_fcfg1.h里面。为什么会找不到这个定义;
就是用的提供的源代码,然后加了个读取mac地址的代码
試試用下面的程序读取MAC地址到macAddress
#include "hw_memmap.h" #include "hw_fcfg1.h" #include "hw_types.h" uint64_t macAddrLsb; uint64_t macAddrMsb; uint64_t macAddress; macAddrLsb = HWREG(FCFG1_BASE + FCFG1_O_MAC_15_4_0); macAddrMsb = HWREG(FCFG1_BASE + FCFG1_O_MAC_15_4_1); macAddress = (uint64_t)(macAddrMsb << 32) + macAddrLsb;
proprietary-rf可以用Yikai说的方法,在CC13X2上的 ti 15.4stack中可以用CCFGRead_IEEE_MAC()直接获取