docs(esp_ringbuf): Corrected example code block

* Closes https://github.com/espressif/esp-idf/issues/13730
This commit is contained in:
Jakob Hasse
2024-05-02 16:10:21 +02:00
parent d06c758489
commit 28d1fc1214
2 changed files with 4 additions and 4 deletions

View File

@@ -87,9 +87,9 @@ The following example demonstrates the usage of :cpp:func:`xRingbufferSendAcquir
//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
dma_item_t item;
dma_item_t *item;
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) {
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,
.eof = 0,
.owner = 1,
.buf = &item->buf,
.buf = item->buf,
};
//Actually send to the ring buffer for consumer to use
res = xRingbufferSendComplete(buf_handle, &item);

View File

@@ -1 +1 @@
.. include:: ../../../en/api-reference/system/freertos_additions.rst
.. include:: ../../../en/api-reference/system/freertos_additions.rst