Skip to content

Commit 6c17e3a

Browse files
committed
Merge branch 'docs/Specify_two_calls_to_RingbufferReceive_is_required_in_wrap_mode' into 'master'
Add a note to specify that two calls to RingbufferReceive are required in wrap mode Closes IDF-1980 See merge request espressif/esp-idf!9999
2 parents 9e45dca + ee135b8 commit 6c17e3a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

components/esp_ringbuf/include/freertos/ringbuf.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ void *xRingbufferReceive(RingbufHandle_t xRingbuffer, size_t *pxItemSize, TickTy
255255
*
256256
* @note A call to vRingbufferReturnItemFromISR() is required after this to free the item retrieved.
257257
* @note Byte buffers do not allow multiple retrievals before returning an item
258+
* @note Two calls to RingbufferReceiveFromISR() are required if the bytes wrap around the end of the ring buffer.
258259
*
259260
* @return
260261
* - Pointer to the retrieved item on success; *pxItemSize filled with the length of the item.
@@ -333,6 +334,7 @@ BaseType_t xRingbufferReceiveSplitFromISR(RingbufHandle_t xRingbuffer,
333334
* @note A call to vRingbufferReturnItem() is required after this to free up the data retrieved.
334335
* @note This function should only be called on byte buffers
335336
* @note Byte buffers do not allow multiple retrievals before returning an item
337+
* @note Two calls to RingbufferReceiveUpTo() are required if the bytes wrap around the end of the ring buffer.
336338
*
337339
* @return
338340
* - Pointer to the retrieved item on success; *pxItemSize filled with

docs/en/api-reference/system/freertos_additions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ using :cpp:func:`xRingbufferReceiveUpTo` and :cpp:func:`vRingbufferReturnItem`
210210
For ISR safe versions of the functions used above, call :cpp:func:`xRingbufferSendFromISR`, :cpp:func:`xRingbufferReceiveFromISR`,
211211
:cpp:func:`xRingbufferReceiveSplitFromISR`, :cpp:func:`xRingbufferReceiveUpToFromISR`, and :cpp:func:`vRingbufferReturnItemFromISR`
212212

213+
.. note::
214+
215+
Two calls to RingbufferReceive[UpTo][FromISR]() are required if the bytes wraps around the end of the ring buffer.
213216

214217
Sending to Ring Buffer
215218
^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)