From 09b55dc297da2b4dc3915f2a4cc0e3b53ea07359 Mon Sep 17 00:00:00 2001 From: robert-hh Date: Tue, 8 Mar 2022 11:40:26 +0100 Subject: [PATCH] esp32/machine_hw_spi: Use automatic DMA channel selection for SPI on C3. Addresses issue #8204. --- ports/esp32/machine_hw_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/esp32/machine_hw_spi.c b/ports/esp32/machine_hw_spi.c index 1515b0074..3e720adb1 100644 --- a/ports/esp32/machine_hw_spi.c +++ b/ports/esp32/machine_hw_spi.c @@ -268,7 +268,7 @@ STATIC void machine_hw_spi_init_internal( // Select DMA channel based on the hardware SPI host int dma_chan = 0; if (self->host == HSPI_HOST) { - #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 + #if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32C3 dma_chan = 3; #else dma_chan = 1;