EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #980 background imageLoading...
Page #980 background image
Chapter 2. API Reference
Warning This API is not thread safe. So, if multiple threads are accessing the same ring buffer, it is the
applications responsibility to ensure atomic access to this API and the subsequent Send
Note An empty no-split buffer has a max current free size for an item that is limited to ((buffer_size/2)-
header_size). See API reference for xRingbufferGetMaxItemSize().
Return Current free size, in bytes, available for an entry
Parameters
[in] xRingbuffer: Ring buffer to query
BaseType_t xRingbufferAddToQueueSetRead(RingbufHandle_t xRingbuer, QueueSetHandle_t
xQueueSet)
Add the ring buffers read semaphore to a queue set.
The ring buffers read semaphore indicates that data has been written to the ring buffer. This function adds
the ring buffers read semaphore to a queue set.
Return
pdTRUE on success, pdFALSE otherwise
Parameters
[in] xRingbuffer: Ring buffer to add to the queue set
[in] xQueueSet: Queue set to add the ring buffers read semaphore to
BaseType_t xRingbufferCanRead(RingbufHandle_t xRingbuer, QueueSetMemberHandle_t xMem-
ber)
Check if the selected queue set member is the ring buffers read semaphore.
This API checks if queue set member returned from xQueueSelectFromSet() is the read semaphore of this
ring buffer. If so, this indicates the ring buffer has items waiting to be retrieved.
Return
pdTRUE when semaphore belongs to ring buffer
pdFALSE otherwise.
Parameters
[in] xRingbuffer: Ring buffer which should be checked
[in] xMember: Member returned from xQueueSelectFromSet
BaseType_t xRingbufferRemoveFromQueueSetRead(RingbufHandle_t xRingbuer, Queue-
SetHandle_t xQueueSet)
Remove the ring buffers read semaphore from a queue set.
This specically removes a ring buffers read semaphore from a queue set. The read semaphore is used to
indicate when data has been written to the ring buffer
Return
pdTRUE on success
pdFALSE otherwise
Parameters
[in] xRingbuffer: Ring buffer to remove from the queue set
[in] xQueueSet: Queue set to remove the ring buffers read semaphore from
void vRingbufferGetInfo(RingbufHandle_t xRingbuer, UBaseType_t *uxFree, UBaseType_t
*uxRead, UBaseType_t *uxWrite, UBaseType_t *uxAcquire, UBaseType_t
*uxItemsWaiting)
Get information about ring buffer status.
Get information of the a ring buffers current status such as free/read/write pointer positions, and number of
items waiting to be retrieved. Arguments can be set to NULL if they are not required.
Parameters
[in] xRingbuffer: Ring buffer to remove from the queue set
[out] uxFree: Pointer use to store free pointer position
[out] uxRead: Pointer use to store read pointer position
[out] uxWrite: Pointer use to store write pointer position
[out] uxAcquire: Pointer use to store acquire pointer position
[out] uxItemsWaiting: Pointer use to store number of items (bytes for byte buffer) waiting
to be retrieved
Espressif Systems 969
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish