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

ParamDescription
queIDA pointer to the queue ID
itemToQueueA 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.
waitMSTime limit to wait in milliseconds.
0do not wait
OSAL_WAIT_FOREVERreturn only when semaphore is obtained
Other valuestimeout delay

Returns

OSAL_RESULT_TRUE - Item copied to the queue

OSAL_RESULT_FALSE - Item not copied to the queue or timeout occurred