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 #978 background imageLoading...
Page #978 background image
Chapter 2. API Reference
[in] xRingbuffer: Ring buffer to retrieve the item from
[out] pxItemSize: Pointer to a variable to which the size of the retrieved item will be written.
BaseType_t xRingbufferReceiveSplit(RingbufHandle_t xRingbuer, void **ppvHeadItem,
void **ppvTailItem, size_t *pxHeadItemSize, size_t
*pxTailItemSize, TickType_t xTicksToWait)
Retrieve a split item from an allow-split ring buffer.
Attempt to retrieve a split item from an allow-split ring buffer. If the item is not split, only a single item is
retried. If the item is split, both parts will be retrieved. This function will block until an item is available or
until it times out.
Note Call(s) to vRingbufferReturnItem() is required after this to free up the item(s) retrieved.
Note This function should only be called on allow-split buffers
Return
pdTRUE if an item (split or unsplit) was retrieved
pdFALSE when no item was retrieved
Parameters
[in] xRingbuffer: Ring buffer to retrieve the item from
[out] ppvHeadItem: Double pointer to first part (set to NULL if no items were retrieved)
[out] ppvTailItem: Double pointer to second part (set to NULL if item is not split)
[out] pxHeadItemSize: Pointer to size of first part (unmodified if no items were retrieved)
[out] pxTailItemSize: Pointer to size of second part (unmodified if item is not split)
[in] xTicksToWait: Ticks to wait for items in the ring buffer.
BaseType_t xRingbufferReceiveSplitFromISR(RingbufHandle_t xRingbuer, void
**ppvHeadItem, void **ppvTailItem, size_t
*pxHeadItemSize, size_t *pxTailItemSize)
Retrieve a split item from an allow-split ring buffer in an ISR.
Attempt to retrieve a split item from an allow-split ring buffer. If the item is not split, only a single item is
retried. If the item is split, both parts will be retrieved. This function returns immediately if there are no items
available for retrieval
Note Calls to vRingbufferReturnItemFromISR() is required after this to free up the item(s) retrieved.
Note This function should only be called on allow-split buffers
Return
pdTRUE if an item (split or unsplit) was retrieved
pdFALSE when no item was retrieved
Parameters
[in] xRingbuffer: Ring buffer to retrieve the item from
[out] ppvHeadItem: Double pointer to first part (set to NULL if no items were retrieved)
[out] ppvTailItem: Double pointer to second part (set to NULL if item is not split)
[out] pxHeadItemSize: Pointer to size of first part (unmodified if no items were retrieved)
[out] pxTailItemSize: Pointer to size of second part (unmodified if item is not split)
void *xRingbufferReceiveUpTo(RingbufHandle_t xRingbuer, size_t *pxItemSize, TickType_t xTick-
sToWait, size_t xMaxSize)
Retrieve bytes from a byte buffer, specifying the maximum amount of bytes to retrieve.
Attempt to retrieve data from a byte buffer whilst specifying a maximum number of bytes to retrieve. This
function will block until there is data available for retrieval or until it times out.
Note A call to vRingbufferReturnItem() is required after this to free up the data retrieved.
Note This function should only be called on byte buffers
Note Byte buffers do not allow multiple retrievals before returning an item
Note Two calls to RingbufferReceiveUpTo() are required if the bytes wrap around the end of the ring buffer.
Return
Pointer to the retrieved item on success; *pxItemSize filled with the length of the item.
NULL on timeout, *pxItemSize is untouched in that case.
Parameters
[in] xRingbuffer: Ring buffer to retrieve the item from
[out] pxItemSize: Pointer to a variable to which the size of the retrieved item will be written.
Espressif Systems 967
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