mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
refactor(gdma): channel allocation can return both direction within the same call
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user