mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/support_sdspi_on_s2_c3-backport_v4.3' into 'release/v4.3'
example: support sdspi on s2 c3 (backports v4.3) See merge request espressif/esp-idf!15426
This commit is contained in:
commit
e7cc27417f
@ -33,12 +33,18 @@ static const char *TAG = "example";
|
|||||||
// #define USE_SPI_MODE
|
// #define USE_SPI_MODE
|
||||||
|
|
||||||
// ESP32-S2 and ESP32-C3 doesn't have an SD Host peripheral, always use SPI:
|
// 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
|
#ifndef USE_SPI_MODE
|
||||||
#define USE_SPI_MODE
|
#define USE_SPI_MODE
|
||||||
#endif // USE_SPI_MODE
|
#endif // USE_SPI_MODE
|
||||||
// on ESP32-S2, DMA channel must be the same as host id
|
// on ESP32-S2, DMA channel must be the same as host id
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32S2
|
||||||
#define SPI_DMA_CHAN host.slot
|
#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
|
#endif //CONFIG_IDF_TARGET_ESP32S2
|
||||||
|
|
||||||
// DMA channel to be used by the SPI peripheral
|
// DMA channel to be used by the SPI peripheral
|
||||||
|
Loading…
Reference in New Issue
Block a user