Other Parts Discussed in Thread: CC2640R2F,
Hi,
I have an application that started from the CC2650LP simple_peripheral example in BLE SDK 2.02.05.02. I'm using the SCIF to interface to a sensor and detect an event. When the event is detected, the SCIF code alerts the application in a function I put in simple_gatt_profile.c. When the event occurs, I would send a notification on one of the characteristics, so I think I need to call SimpleBLEPeripheral_enqueueMsg. I'm not sure how to accomplish this from simple_gatt_profile.c. What do I use for event and state parameters to that function?
Alternatively, I could put the code from SimpleBLEPeripheral_enqueueMsg inside my ISR:
sbpEvt_t *pMsg;
// Create dynamic pointer to message.
if ((pMsg = ICall_malloc(sizeof(sbpEvt_t))))
{
pMsg->hdr.event = event;
pMsg->hdr.state = state;
// Enqueue the message.
Util_enqueueMsg(appMsgQueue, sem, (uint8*)pMsg);
}
but then I'm not sure where to get appMsgQueue or sem to "connect" them to the BLE task.
First time OS user here. Any comments/hints appreciated.
Thanks,
Jim