1 /* 2 * Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_INCLUDE_DRIVERS_DMA_ESP32_H_ 8 #define ZEPHYR_INCLUDE_DRIVERS_DMA_ESP32_H_ 9 10 enum gdma_trigger_peripheral { 11 ESP_GDMA_TRIG_PERIPH_M2M = -1, 12 ESP_GDMA_TRIG_PERIPH_SPI2 = 0, 13 ESP_GDMA_TRIG_PERIPH_SPI3 = 1, 14 ESP_GDMA_TRIG_PERIPH_UHCI0 = 2, 15 ESP_GDMA_TRIG_PERIPH_I2S0 = 3, 16 ESP_GDMA_TRIG_PERIPH_I2S1 = 4, 17 ESP_GDMA_TRIG_PERIPH_LCD0 = 5, 18 ESP_GDMA_TRIG_PERIPH_CAM0 = 5, 19 ESP_GDMA_TRIG_PERIPH_AES = 6, 20 ESP_GDMA_TRIG_PERIPH_SHA = 7, 21 ESP_GDMA_TRIG_PERIPH_ADC0 = 8, 22 ESP_GDMA_TRIG_PERIPH_DAC0 = 8, 23 ESP_GDMA_TRIG_PERIPH_RMT = 9, 24 ESP_GDMA_TRIG_PERIPH_INVALID = 0x3F, 25 }; 26 27 #define ESP32_DT_INST_DMA_CTLR(n, name) \ 28 COND_CODE_1(DT_INST_NODE_HAS_PROP(n, dmas), \ 29 (DEVICE_DT_GET(DT_INST_DMAS_CTLR_BY_NAME(n, name))), \ 30 (NULL)) 31 32 #define ESP32_DT_INST_DMA_CELL(n, name, cell) \ 33 COND_CODE_1(DT_INST_NODE_HAS_PROP(n, dmas), \ 34 (DT_INST_DMAS_CELL_BY_NAME(n, name, cell)), \ 35 (0xff)) 36 37 38 #endif /* ZEPHYR_INCLUDE_DRIVERS_DMA_ESP32_H_ */ 39