Chapter 2. API Reference
(continued from previous page)
BaseType_t xTaskWokenByReceive = pdFALSE;
char cRxedChar;
while( xQueueReceiveFromISR( xQueue, ( void * ) &cRxedChar, &
,→xTaskWokenByReceive) )
{
// A character was received. Output the character now.
vOutputCharacter( cRxedChar );
// If removing the character from the queue woke the task that was
// posting onto the queue cTaskWokenByReceive will have been set to
// pdTRUE. No matter how many times this loop iterates only one
// task will be woken.
}
if( cTaskWokenByPost != ( char ) pdFALSE;
{
taskYIELD ();
}
}
Return pdTRUE if an item was successfully received from the queue, otherwise pdFALSE.
Parameters
• xQueue: The handle to the queue from which the item is to be received.
• pvBuffer: Pointer to the buffer into which the received item will be copied.
• [out] pxHigherPriorityTaskWoken: A task may be blocked waiting for space to become
available on the queue. If xQueueReceiveFromISR causes such a task to unblock *pxTaskWoken
will get set to pdTRUE, otherwise *pxTaskWoken will remain unchanged.
BaseType_t xQueueIsQueueEmptyFromISR(const QueueHandle_t xQueue)
BaseType_t xQueueIsQueueFullFromISR(const QueueHandle_t xQueue)
UBaseType_t uxQueueMessagesWaitingFromISR(const QueueHandle_t xQueue)
void vQueueAddToRegistry(QueueHandle_t xQueue, const char *pcQueueName)
The registry is provided as a means for kernel aware debuggers to locate queues, semaphores and mutexes. Call
vQueueAddToRegistry() add a queue, semaphore or mutex handle to the registry if you want the handle to be
available to a kernel aware debugger. If you are not using a kernel aware debugger then this function can be
ignored.
configQUEUE_REGISTRY_SIZE defines the maximum number of handles the registry can hold. con-
figQUEUE_REGISTRY_SIZE must be greater than 0 within FreeRTOSConfig.h for the registry to be avail-
able. Its value does not effect the number of queues, semaphores and mutexes that can be created - just the
number that the registry can hold.
Parameters
• xQueue: The handle of the queue being added to the registry. This is the handle returned by a call
to xQueueCreate(). Semaphore and mutex handles can also be passed in here.
• pcQueueName: The name to be associated with the handle. This is the name that the kernel aware
debugger will display. The queue registry only stores a pointer to the string - so the string must be
persistent (global or preferably in ROM/Flash), not on the stack.
void vQueueUnregisterQueue(QueueHandle_t xQueue)
The registry is provided as a means for kernel aware debuggers to locate queues, semaphores and mutexes.
Call vQueueAddToRegistry() add a queue, semaphore or mutex handle to the registry if you want the handle
to be available to a kernel aware debugger, and vQueueUnregisterQueue() to remove the queue, semaphore or
mutex from the register. If you are not using a kernel aware debugger then this function can be ignored.
Parameters
• xQueue: The handle of the queue being removed from the registry.
Espressif Systems 889
Submit Document Feedback
Release v4.4