我是在BLE-STACK V2.1 (Support for CC2640CC2650)中的SimpleBLEPeripheral例子中
增加一个Task
/* SimpleBLEPeripheral - Priority 1 */SimpleBLEPeripheral_createTask();/*Light main task - Priority 1*/SimpleBLELight_createTask();
void SimpleBLELight_createTask(void)
{
Task_Params taskParams;
// Configure task
Task_Params_init(&taskParams);
taskParams.stack = sblTaskStack;
taskParams.stackSize = SBL_TASK_STACK_SIZE;
taskParams.priority = SBL_TASK_PRIORITY;
Task_construct(&sblTask, LightMainTask, &taskParams, NULL);
}
void LightMainTask(UArg a0, UArg a1)
{ICall_registerApp(&lightSelfEntity, &lightSem)IRTemp_addService();
}
其中IRTemp_addService(); 是SensorTag的Profile里面的irtempservice.c中的代码
当程序执行到IRTemp_addService(); 里面的
// Register GATT attribute list and CBs with GATT Server App
return GATTServApp_RegisterService( sensorAttrTable, GATT_NUM_ATTRS (sensorAttrTable), GATT_MAX_ENCRYPT_KEY_SIZE, &sensorCBs );
就Program exit reached
请TI帮忙?????????????
haibin deng:
你好!
我之前也遇到过类似的问题,我猜测是不是任务间有些数据和东西是不能共享的,我后面只能把profile放在第一个任务中了,
TI中文支持网


