1、CC2650 更新广播数据是否还是调用 GAP_UpdateAdvertisingData( uint8 taskID, uint8 adType, uint8 dataLen, uint8 *pAdvertData ) 函数?
2、如果是,请问函数需要传递的 taskID 用哪一个变量啊,这个不像 CC254x ,在初始化的时候就会返回一个 taskID 。
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.
1、CC2650 更新广播数据是否还是调用 GAP_UpdateAdvertisingData( uint8 taskID, uint8 adType, uint8 dataLen, uint8 *pAdvertData ) 函数?
2、如果是,请问函数需要传递的 taskID 用哪一个变量啊,这个不像 CC254x ,在初始化的时候就会返回一个 taskID 。
可以还是使用GAP_UpdateAdvertisingData函数,调用方式在SimpleBLEPeripheral代码里面可以看到例子
case GAPROLE_ADVERT_DATA:
if (len <= B_MAX_ADV_LEN)
{
VOID memset(gapRole_AdvertData, 0, B_MAX_ADV_LEN);
VOID memcpy(gapRole_AdvertData, pValue, len);
gapRole_AdvertDataLen = len;
// Update the advertising data
ret = GAP_UpdateAdvertisingData(selfEntity,
TRUE, gapRole_AdvertDataLen, gapRole_AdvertData);
}