1.1.1.2.5 OSAL_QUEUE_Send Function
C
OSAL_RESULT OSAL_QUEUE_Send(OSAL_QUEUE_HANDLE_TYPE *queID, void *itemToQueue, uint16_t waitMS);
Description
Post an item into an OSAL Queue. The item is queued by copy, not by reference. This function must not be called from an interrupt service routine. See OSAL_QUEUE_SendISR() for an alternative which may be used in an ISR.
Parameters
Param | Description |
---|---|
queID | A pointer to the queue ID |
itemToQueue | A pointer to the item that is to be placed on the queue. The size of the items the queue will hold was defined when the queue was created, so this many bytes will be copied from itemToQueue into the queue storage area. |
waitMS | Time limit to wait in milliseconds. |
0 | do not wait |
OSAL_WAIT_FOREVER | return only when semaphore is obtained |
Other values | timeout delay |
Returns
OSAL_RESULT_TRUE - Item copied to the queue
OSAL_RESULT_FALSE - Item not copied to the queue or timeout occurred