bool OS_Queue_Check (queue)
bool OS_Queue_Check_I (queue)
Check if there is any message in queue.
OS_ENABLE_QUEUE constant must be defined in OSAcfg.h.
Everywhere
queue |
Queue of messages descriptor. Variable of OST_QUEUE type. |
false |
queue is empty |
true |
there are some messages in queue |
OST_QUEUE queue; void Task (void) { OST_MSG msg; for (;;) { /*...*/ if (OS_Queue_Check(queue)) { // If any message present OS_AcceptQueue(queue, msg); // then accept it /*...*/ } /*...*/ } }
OS_CheckQMsg