refactor(gdma): channel allocation can return both direction within the same call

This commit is contained in:
morris
2026-01-07 22:44:54 +08:00
parent 78206e9f1e
commit 7909976e0f
31 changed files with 336 additions and 365 deletions
+1 -2
View File
@@ -29,12 +29,11 @@ esp_err_t adc_dma_init(adc_dma_t *adc_dma)
esp_err_t ret = ESP_OK;
//alloc rx gdma channel
gdma_channel_alloc_config_t rx_alloc_config = {
.direction = GDMA_CHANNEL_DIRECTION_RX,
#if CONFIG_ADC_CONTINUOUS_ISR_IRAM_SAFE
.flags.isr_cache_safe = true,
#endif
};
ret = gdma_new_ahb_channel(&rx_alloc_config, &(adc_dma->gdma_chan));
ret = gdma_new_ahb_channel(&rx_alloc_config, NULL, &(adc_dma->gdma_chan));
if (ret != ESP_OK) {
return ret;
}