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.

GAP_DeviceInit(GAP_PROFILE_PERIPHERAL, selfEntity, addrMode, NULL); 把NULL修改为mac_addr后无法扫描到设备,这样设置不对吗?

如题:simplelink_cc13x2_26x2_sdk_3_40_00_02中例程,代码修改为如下,无法扫描到设备,

void GetMacAddress(uint8_t *p_Address)
{
uint32_t Mac0 = HWREG(FCFG1_BASE + FCFG1_O_MAC_BLE_0);
uint32_t Mac1 = HWREG(FCFG1_BASE + FCFG1_O_MAC_BLE_1);

p_Address[5] = Mac0;
p_Address[4] = Mac0 >> 8;
p_Address[3] = Mac0 >> 16;
p_Address[2] = Mac0 >> 24;
p_Address[1] = Mac1;
p_Address[0] = Mac1 >> 8;

}

uint8_t mac_addr[6];
GetMacAddress(mac_addr);

//Initialize GAP layer for Peripheral role and register to receive GAP events
GAP_DeviceInit(GAP_PROFILE_PERIPHERAL, selfEntity, addrMode, mac_addr);