Other Parts Discussed in Thread: SYSBIOS
Hy there,
based on the OAD example from Sensor Tag I try to use a TI Sysbios Queue to buffer BLE messages until the application can process them.
I have the following code:
in main.c: function WriteCB() which is called as callback from my service (WriteAttrCB)
oadTargetWrite_t *oadWriteEvt = ICall_malloc( sizeof(oadTargetWrite_t)); Queue_enqueue(hOadQ, (Queue_Elem *)oadWriteEvt); QueueCounter++;
in main.c, function taskFxn
while (!Queue_empty(hOadQ))
{
oadTargetWrite_t *oadWriteEvt = Queue_dequeue(hOadQ);
DeQueueCounter++;
}
Ever once in a while (approx every 2000th time), the DeQueueCounter is one less than the QueueCounter, so apparently, the data gets queued but not unqueued.
The function Queue_enqueue has no return value. Is it possible, that the call is not successful?
Best regards
Harald