Espressif ESP32-S2 Programming Manual page 900

Table of Contents

Advertisement

Chapter 2. API Reference
BaseType_t xTaskWokenByReceive
char cRxedChar;
while( xQueueReceiveFromISR( xQueue, ( void
xTaskWokenByReceive) )
{
//
A character was
vOutputCharacter( cRxedChar );
//
If removing the character
//
posting onto the queue cTaskWokenByReceive will have been
// pdTRUE.
//
task will be
}
if( cTaskWokenByPost
{
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
BaseType_t xQueueIsQueueFullFromISR(const
UBaseType_t uxQueueMessagesWaitingFromISR(const
void
vQueueAddToRegistry(QueueHandle_t
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
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
=
pdFALSE;
received.
Output the character
from
No matter how many times this loop iterates only one
woken.
!=
( char ) pdFALSE;
xQueue, const char *pcQueueName)
xQueue)
889
Submit Document Feedback
*
) &cRxedChar,
now.
the
queue woke the task that was
QueueHandle_t
xQueue)
QueueHandle_t
xQueue)
QueueHandle_t
xQueue)
(continued from previous page)
&
set
to
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents

Save PDF