ESP32-S3 has different GPIO - allow using them in UI

This is a dirty hack, but I don't know enough about JS to make a clean solution.

- xml.cpp: -S3 has different "forbidden GPIO".
- LED settings & UM settings: temporarily disabled some "sorry PINS cannot be used" alerts. Changed maximum GPIO number to 48.
This commit is contained in:
Frank
2022-09-03 18:36:00 +02:00
parent 78d79be5a4
commit af2d8aab98
7 changed files with 4472 additions and 4468 deletions

View File

@@ -259,7 +259,11 @@ void getSettingsJS(byte subPage, char* dest)
// Pin reservations will become unnecessary when settings pages will read cfg.json directly
// add reserved and usermod pins as d.um_p array
oappend(SET_F("d.um_p=[6,7,8,9,10,11"));
#if defined(CONFIG_IDF_TARGET_ESP32S3)
oappend(SET_F("d.um_p=[19,20,22,23,24,25,26,27,28,29,30,31,32")); // unusable GPIO on ESP32-S3
#else
oappend(SET_F("d.um_p=[6,7,8,9,10,11")); // unusable GPIO on classic ESP32
#endif
if (i2c_sda > -1 && i2c_scl > -1) {
oappend(","); oappend(itoa(i2c_sda,nS,10));
@@ -282,14 +286,14 @@ void getSettingsJS(byte subPage, char* dest)
oappend(SET_F(",2")); // DMX hardcoded pin
#endif
#ifdef WLED_DEBUG
oappend(SET_F(",1")); // debug output (TX) pin
#if defined(WLED_DEBUG) && !defined(CONFIG_IDF_TARGET_ESP32S3)
oappend(SET_F(",1")); // debug output (TX) pin - on classic ESP32
#endif
//Note: Using pin 3 (RX) disables Adalight / Serial JSON
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
if (psramFound()) oappend(SET_F(",16,17")); // GPIO16 & GPIO17 reserved for SPI RAM
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM) && !defined(CONFIG_IDF_TARGET_ESP32S3)
if (psramFound()) oappend(SET_F(",16,17")); // GPIO16 & GPIO17 reserved for SPI RAM (on classic ESP32)
#endif
#ifdef WLED_USE_ETHERNET