From f1202abc4ebc4ea318dc0717b0d3102fd9edc43a Mon Sep 17 00:00:00 2001 From: SalimTerryLi Date: Fri, 24 Sep 2021 15:17:03 +0800 Subject: [PATCH] example/sdspi: fix incorrect SPI DMA setting on c3 --- examples/storage/sd_card/sdspi/main/sd_card_example_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/storage/sd_card/sdspi/main/sd_card_example_main.c b/examples/storage/sd_card/sdspi/main/sd_card_example_main.c index 38f34c12a6..b15fe41c9c 100644 --- a/examples/storage/sd_card/sdspi/main/sd_card_example_main.c +++ b/examples/storage/sd_card/sdspi/main/sd_card_example_main.c @@ -34,8 +34,10 @@ static const char *TAG = "example"; #endif //CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 -#if CONFIG_IDF_TARGET_ESP32S2 ||CONFIG_IDF_TARGET_ESP32C3 +#if CONFIG_IDF_TARGET_ESP32S2 #define SPI_DMA_CHAN host.slot +#elif CONFIG_IDF_TARGET_ESP32C3 +#define SPI_DMA_CHAN SPI_DMA_CH_AUTO #else #define SPI_DMA_CHAN 1 #endif