forked from espressif/esp-idf
Merge branch 'doc/ringbuffer_v5.1' into 'release/v5.1'
docs(esp_ringbuf): Corrected example code block (v5.1) See merge request espressif/esp-idf!30634
This commit is contained in:
@@ -87,9 +87,9 @@ The following example demonstrates the usage of :cpp:func:`xRingbufferSendAcquir
|
|||||||
|
|
||||||
//Retrieve space for DMA descriptor and corresponding data buffer
|
//Retrieve space for DMA descriptor and corresponding data buffer
|
||||||
//This has to be done with SendAcquire, or the address may be different when we copy
|
//This has to be done with SendAcquire, or the address may be different when we copy
|
||||||
dma_item_t item;
|
dma_item_t *item;
|
||||||
UBaseType_t res = xRingbufferSendAcquire(buf_handle,
|
UBaseType_t res = xRingbufferSendAcquire(buf_handle,
|
||||||
&item, DMA_ITEM_SIZE(buffer_size), pdMS_TO_TICKS(1000));
|
(void**) &item, DMA_ITEM_SIZE(buffer_size), pdMS_TO_TICKS(1000));
|
||||||
if (res != pdTRUE) {
|
if (res != pdTRUE) {
|
||||||
printf("Failed to acquire memory for item\n");
|
printf("Failed to acquire memory for item\n");
|
||||||
}
|
}
|
||||||
@@ -98,7 +98,7 @@ The following example demonstrates the usage of :cpp:func:`xRingbufferSendAcquir
|
|||||||
.length = buffer_size,
|
.length = buffer_size,
|
||||||
.eof = 0,
|
.eof = 0,
|
||||||
.owner = 1,
|
.owner = 1,
|
||||||
.buf = &item->buf,
|
.buf = item->buf,
|
||||||
};
|
};
|
||||||
//Actually send to the ring buffer for consumer to use
|
//Actually send to the ring buffer for consumer to use
|
||||||
res = xRingbufferSendComplete(buf_handle, &item);
|
res = xRingbufferSendComplete(buf_handle, &item);
|
||||||
|
@@ -1 +1 @@
|
|||||||
.. include:: ../../../en/api-reference/system/freertos_additions.rst
|
.. include:: ../../../en/api-reference/system/freertos_additions.rst
|
||||||
|
Reference in New Issue
Block a user