mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 09:09:10 -04:00
example/storage: fix incorrect SDSPI DMA setting on c3
Closes https://github.com/espressif/esp-idf/issues/7389
This commit is contained in:
parent
86b7acc932
commit
c0695e4216
@ -33,12 +33,18 @@ static const char *TAG = "example";
|
||||
// #define USE_SPI_MODE
|
||||
|
||||
// ESP32-S2 and ESP32-C3 doesn't have an SD Host peripheral, always use SPI:
|
||||
#if CONFIG_IDF_TARGET_ESP32S2 ||CONFIG_IDF_TARGET_ESP32C3
|
||||
#if CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32C3
|
||||
|
||||
#ifndef USE_SPI_MODE
|
||||
#define USE_SPI_MODE
|
||||
#endif // USE_SPI_MODE
|
||||
// on ESP32-S2, DMA channel must be the same as host id
|
||||
#if CONFIG_IDF_TARGET_ESP32S2
|
||||
#define SPI_DMA_CHAN host.slot
|
||||
#elif CONFIG_IDF_TARGET_ESP32C3
|
||||
#define SPI_DMA_CHAN SPI_DMA_CH_AUTO
|
||||
#endif //CONFIG_IDF_TARGET_ESP32S2
|
||||
|
||||
#endif //CONFIG_IDF_TARGET_ESP32S2
|
||||
|
||||
// DMA channel to be used by the SPI peripheral
|
||||
|
Loading…
x
Reference in New Issue
Block a user