feat(dma): advanced dma malloc helper

This commit is contained in:
Armando
2024-01-24 13:28:15 +08:00
committed by Gao Xu
parent 9c846916fa
commit f0518b3c16
27 changed files with 672 additions and 130 deletions
+3 -3
View File
@@ -106,10 +106,10 @@ Memory Allocation Helper
cache memory synchronization is usually considered when DMA is involved. ESP-IDF provides an API to do memory allocation that can meet the alignment requirement from both the cache and the DMA.
- :cpp:func:`esp_dma_malloc`, this API allocates a chunk of memory that meets the alignment requirement from both the cache and the DMA.
- :cpp:func:`esp_dma_calloc`, this API allocates a chunk of memory that meets the alignment requirement from both the cache and the DMA. The initialized value in the memory is set to zero.
- :cpp:func:`esp_dma_capable_malloc`, this API allocates a chunk of memory that meets the alignment requirement from both the cache and the DMA.
- :cpp:func:`esp_dma_capable_calloc`, this API allocates a chunk of memory that meets the alignment requirement from both the cache and the DMA. The initialized value in the memory is set to zero.
You can also use :c:macro:`ESP_DMA_MALLOC_FLAG_PSRAM` to allocate from the PSRAM.
You can also use :cpp:member:`esp_dma_mem_info_t::on_psram` to allocate from the PSRAM.
Warning for Address Alignment Requirement