FreeRTOS + 0/10 examples
CodeScope will show references to xQueueSendFromISR from the following samples and libraries:
Libraries
Examples
STM32446E_EVAL
Applications
FreeRTOS
STM32469I-Discovery
Applications
FreeRTOS
STM32469I_EVAL
Applications
FreeRTOS
STM324x9I_EVAL
Applications
FreeRTOS
STM324xG_EVAL
Applications
FreeRTOS
STM32F412G-Discovery
Applications
FreeRTOS
STM32F413H-Discovery
Applications
FreeRTOS
STM32F413ZH-Nucleo
Applications
FreeRTOS
STM32F429I-Discovery
Applications
FreeRTOS
 
Symbols
loading...
Files
loading...

xQueueSendFromISR macro

This is a macro that calls xQueueGenericSendFromISR(). It is included for backward compatibility with versions of FreeRTOS.org that did not include the xQueueSendToBackFromISR() and xQueueSendToFrontFromISR() macros. Post an item to the back of a queue. It is safe to use this function from within an interrupt service routine. Items are queued by copy not reference so it is preferable to only queue small items, especially when called from an ISR. In most cases it would be preferable to store a pointer to the item being queued. Example usage for buffered IO (where the ISR can obtain more than one value per call):
void vBufferISR( void ) { char cIn; BaseType_t xHigherPriorityTaskWoken; // We have not woken a task at the start of the ISR. xHigherPriorityTaskWoken = pdFALSE; // Loop until the buffer is empty. do { // Obtain a byte from the buffer. cIn = portINPUT_BYTE( RX_REGISTER_ADDRESS ); // Post the byte. xQueueSendFromISR( xRxQueue, &cIn, &xHigherPriorityTaskWoken ); } while( portINPUT_BYTE( BUFFER_COUNT ) ); // Now the buffer is empty we can switch context if necessary. if( xHigherPriorityTaskWoken ) { // Actual macro used here is port specific. portYIELD_FROM_ISR (); } }

Syntax

#define xQueueSendFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )

Arguments

xQueue

The handle to the queue on which the item is to be posted.

pvItemToQueue

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 pvItemToQueue into the queue storage area.

pxHigherPriorityTaskWoken

xQueueSendFromISR() will set *pxHigherPriorityTaskWoken to pdTRUE if sending to the queue caused a task to unblock, and the unblocked task has a priority higher than the currently running task. If xQueueSendFromISR() sets this value to pdTRUE then a context switch should be requested before the interrupt is exited.

Return value

pdTRUE if the data was successfully sent to the queue, otherwise errQUEUE_FULL.

Examples

xQueueSendFromISR is referenced by 10 libraries and example projects.

References

LocationText
queue.h:1216
#define xQueueSendFromISR( xQueue, pvItemToQueue, pxHigherPriorityTaskWoken ) xQueueGenericSendFromISR( ( xQueue ), ( pvItemToQueue ), ( pxHigherPriorityTaskWoken ), queueSEND_TO_BACK )
cmsis_os.c:1078
if (xQueueSendFromISR(queue_id, &info, &taskWoken) != pdTRUE) {
cmsis_os.c:1269
if (xQueueSendFromISR(queue_id->handle, &mail, &taskWoken) != pdTRUE) {