Unverified Commit 97ca3fdb authored by Bodmer's avatar Bodmer Committed by GitHub

Merge pull request #1602 from Brezensalzer/master

added USE_FSPI_PORT flag to support more ESP32-S2 boards
parents 32d99142 14ff368d
......@@ -11,16 +11,18 @@
#ifdef CONFIG_IDF_TARGET_ESP32
#ifdef USE_HSPI_PORT
SPIClass spi = SPIClass(HSPI);
#elif defined(USE_FSPI_PORT)
SPIClass spi = SPIClass(FSPI);
#else // use default VSPI port
//SPIClass& spi = SPI;
SPIClass spi = SPIClass(VSPI);
#endif
#else
#ifdef USE_HSPI_PORT
SPIClass spi = SPIClass(HSPI);
#else // use FSPI port
//SPIClass& spi = SPI;
#elif defined(USE_FSPI_PORT)
SPIClass spi = SPIClass(FSPI);
#else // use FSPI port
SPIClass& spi = SPI;
#endif
#endif
#endif
......@@ -32,6 +34,8 @@
#define DMA_CHANNEL 1
#ifdef USE_HSPI_PORT
spi_host_device_t spi_host = HSPI_HOST;
#elif defined(USE_FSPI_PORT)
spi_host_device_t spi_host = SPI_HOST;
#else // use VSPI port
spi_host_device_t spi_host = VSPI_HOST;
#endif
......
......@@ -67,6 +67,8 @@ SPI3_HOST = 2
#else
#define SPI_PORT 3 //HSPI is port 3 on ESP32 S2
#endif
#elif defined(USE_FSPI_PORT)
#define SPI_PORT 2 //FSPI(ESP32 S2)
#else
#ifdef CONFIG_IDF_TARGET_ESP32
#define SPI_PORT VSPI
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment