File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
zh_CN/api-reference/system Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -97,9 +97,9 @@ The following example demonstrates the usage of :cpp:func:`xRingbufferSendAcquir
9797
9898 //Retrieve space for DMA descriptor and corresponding data buffer
9999 //This has to be done with SendAcquire, or the address may be different when we copy
100- dma_item_t item;
100+ dma_item_t * item;
101101 UBaseType_t res = xRingbufferSendAcquire(buf_handle,
102- &item, DMA_ITEM_SIZE(buffer_size), pdMS_TO_TICKS(1000));
102+ (void**) &item, DMA_ITEM_SIZE(buffer_size), pdMS_TO_TICKS(1000));
103103 if (res != pdTRUE) {
104104 printf("Failed to acquire memory for item\n");
105105 }
@@ -108,7 +108,7 @@ The following example demonstrates the usage of :cpp:func:`xRingbufferSendAcquir
108108 .length = buffer_size,
109109 .eof = 0,
110110 .owner = 1,
111- .buf = & item->buf,
111+ .buf = item->buf,
112112 };
113113 //Actually send to the ring buffer for consumer to use
114114 res = xRingbufferSendComplete(buf_handle, &item);
Original file line number Diff line number Diff line change @@ -97,9 +97,9 @@ ESP-IDF 环形 buffer 是一个典型的 FIFO buffer,支持任意大小的数
9797
9898 //为 DMA 描述符和相应的数据 buffer 检索空间
9999 //此步骤必须通过 SendAcquire 完成,否则,复制时地址可能会不同
100- dma_item_t item;
100+ dma_item_t * item;
101101 UBaseType_t res = xRingbufferSendAcquire(buf_handle,
102- &item, DMA_ITEM_SIZE(buffer_size), pdMS_TO_TICKS(1000));
102+ (void**) &item, DMA_ITEM_SIZE(buffer_size), pdMS_TO_TICKS(1000));
103103 if (res != pdTRUE) {
104104 printf("Failed to acquire memory for item\n");
105105 }
@@ -108,7 +108,7 @@ ESP-IDF 环形 buffer 是一个典型的 FIFO buffer,支持任意大小的数
108108 .length = buffer_size,
109109 .eof = 0,
110110 .owner = 1,
111- .buf = & item->buf,
111+ .buf = item->buf,
112112 };
113113 //实际发送到环形 buffer 以供使用
114114 res = xRingbufferSendComplete(buf_handle, &item);
You can’t perform that action at this time.
0 commit comments