mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
Merge branch 'feat/esp_async_memcpy_blocking_api' into 'master'
feat(esp_driver_dma): add blocking async memcpy API See merge request espressif/esp-idf!49295
This commit is contained in:
@@ -67,6 +67,14 @@ DMA 允许多个内存复制请求在首个请求完成之前排队,即允许
|
||||
// 其他事项
|
||||
xSemaphoreTake(my_semaphore, portMAX_DELAY); // 等待 buffer 复制完成
|
||||
|
||||
对于只需等待单次复制完成的简单场景,可以使用 :cpp:func:`esp_memcpy_blocking`。该 API 基于异步请求路径实现,并在内部等待完成回调。
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
ESP_ERROR_CHECK(esp_memcpy_blocking(driver_handle, to, from, copy_len, -1));
|
||||
|
||||
阻塞 API 不能在 ISR 上下文中调用。目前仅支持 ``timeout_ms = -1``,表示无限期等待直到内存复制完成。
|
||||
|
||||
|
||||
卸载驱动
|
||||
----------------
|
||||
|
||||
Reference in New Issue
Block a user