mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-29 06:06:40 +00:00
Add support for ESP32-S2 #250
This commit is contained in:
parent
e8e78df7d9
commit
44355f24b9
@ -144,17 +144,25 @@ static lgfx::Bus_SPI* init_spi_bus(Preferences* prefs)
|
|||||||
case 1:
|
case 1:
|
||||||
// SPI_HOST (SPI1_HOST) is not supported by the SPI Master and SPI Slave driver on ESP32-S2 and later
|
// SPI_HOST (SPI1_HOST) is not supported by the SPI Master and SPI Slave driver on ESP32-S2 and later
|
||||||
LOG_DEBUG(TAG_TFT, F("%s - %d"), __FILE__, __LINE__);
|
LOG_DEBUG(TAG_TFT, F("%s - %d"), __FILE__, __LINE__);
|
||||||
cfg.spi_host = SPI1_HOST;
|
cfg.spi_host = SPI_HOST;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case 2: // HSPI on ESP32 and HSPI on ESP32-S2
|
case 2: // HSPI on ESP32 and FSPI on ESP32-S2
|
||||||
LOG_DEBUG(TAG_TFT, F("%s - %d"), __FILE__, __LINE__);
|
LOG_DEBUG(TAG_TFT, F("%s - %d"), __FILE__, __LINE__);
|
||||||
cfg.spi_host = SPI2_HOST;
|
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||||
|
cfg.spi_host = HSPI_HOST;
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||||
|
cfg.spi_host = FSPI_HOST;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
default: // VSPI on ESP32 and FSPI on ESP32-S2
|
default: // VSPI on ESP32 and HSPI on ESP32-S2
|
||||||
LOG_DEBUG(TAG_TFT, F("%s - %d"), __FILE__, __LINE__);
|
LOG_DEBUG(TAG_TFT, F("%s - %d"), __FILE__, __LINE__);
|
||||||
cfg.spi_host = SPI3_HOST;
|
#ifdef CONFIG_IDF_TARGET_ESP32
|
||||||
|
cfg.spi_host = VSPI_HOST;
|
||||||
|
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||||
|
cfg.spi_host = HSPI_HOST;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
bus->config(cfg); // The set value is reflected on the bus.
|
bus->config(cfg); // The set value is reflected on the bus.
|
||||||
bus->init();
|
bus->init();
|
||||||
|
@ -62,7 +62,7 @@ lib_ignore =
|
|||||||
;LittleFS_esp32 ; for v2
|
;LittleFS_esp32 ; for v2
|
||||||
|
|
||||||
lib_deps =
|
lib_deps =
|
||||||
;LittleFS_esp32 ; for v1
|
lorol/LittleFS_esp32@^1.0.6 ; for v1
|
||||||
bodmer/TFT_eSPI@2.4.32
|
bodmer/TFT_eSPI@2.4.32
|
||||||
;ESP Async WebServer
|
;ESP Async WebServer
|
||||||
git+https://github.com/fvanroie/ConsoleInput.git#dev
|
git+https://github.com/fvanroie/ConsoleInput.git#dev
|
||||||
|
Loading…
x
Reference in New Issue
Block a user