Hi,
The simple peripheral example program has handling for QUEUE EVENT. However the project zero example program don't have handling for QUEUE EVENT. Which one is correct implementation. Also for simple peripheral how does SBP_QUEUE_EVT get posted to Event_pend(). Because, I have not seen code that Event Post SBP_QUEUE_EVT.
simple_peripheral.c inside SimpleBLEPeripheral_taskFxn()
// If RTOS queue is not empty, process app message.
if (events & SBP_QUEUE_EVT)
{
while (!Queue_empty(appMsgQueue))
{
sbpEvt_t *pMsg = (sbpEvt_t *)Util_dequeueMsg(appMsgQueue);
if (pMsg)
{
// Process message.
SimpleBLEPeripheral_processAppMsg(pMsg);
// Free the space from the message.
ICall_free(pMsg);
}
}
}
project_zero.c inside ProjectZero_taskFxn(). PRZ_QUEUE_EVT was not used in if condition.
// Process messages sent from another task or another context.
while (!Queue_empty(hApplicationMsgQ))
{
app_msg_t *pMsg = Queue_dequeue(hApplicationMsgQ);
// Process application-layer message probably sent from ourselves.
user_processApplicationMessage(pMsg);
// Free the received message.
ICall_free(pMsg);
}
- kel