feat(gdma): support channel allocator on esp32p4

There's two GDMA groups on ESP32P4, one is connected to AHB bus,
and another one is connected AXI bus.
We now have two seperate APIs for allocating DMA channels,
depends on the bus type.
This commit is contained in:
morris
2023-07-11 16:32:54 +08:00
parent 0ac1ee4358
commit 57879e772d
18 changed files with 787 additions and 480 deletions

View File

@@ -120,6 +120,18 @@ typedef struct {
} gdma_strategy_config_t;
/** @cond */
/**
* @brief Create GDMA channel (only create AHB GDMA channel)
* @note This API is going to be deprecated, please use `gdma_new_ahb_channel` or `gdma_new_axi_channel` instead.
*
* @param[in] config Pointer to a collection of configurations for allocating GDMA channel
* @param[out] ret_chan Returned channel handle
* @return
* - ESP_OK: Create DMA channel successfully
* - ESP_ERR_INVALID_ARG: Create DMA channel failed because of invalid argument
* - ESP_ERR_NO_MEM: Create DMA channel failed because out of memory
* - ESP_FAIL: Create DMA channel failed because of other error
*/
esp_err_t gdma_new_channel(const gdma_channel_alloc_config_t *config, gdma_channel_handle_t *ret_chan);
/** @endcond */