pinmanager support for S3 WROOM-2 (pin 33-37 reserved for flash)

pull/4243/head
Frank 2024-11-01 21:31:57 +01:00
rodzic 1898be2fe1
commit 749d34cd30
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -201,7 +201,12 @@ bool PinManager::isPinOk(byte gpio, bool output)
if (gpio > 18 && gpio < 21) return false; // 19 + 20 = USB-JTAG. Not recommended for other uses.
#endif
if (gpio > 21 && gpio < 33) return false; // 22 to 32: not connected + SPI FLASH
if (gpio > 32 && gpio < 38) return !psramFound(); // 33 to 37: not available if using _octal_ SPI Flash or _octal_ PSRAM
#if CONFIG_ESPTOOLPY_FLASHMODE_OPI // 33-37: never available if using _octal_ Flash (opi_opi)
if (gpio > 32 && gpio < 38) return false;
#endif
#if CONFIG_SPIRAM_MODE_OCT // 33-37: not available if using _octal_ PSRAM (qio_opi), but free to use on _quad_ PSRAM (qio_qspi)
if (gpio > 32 && gpio < 38) return !psramFound();
#endif
// 38 to 48 are for general use. Be careful about straping pins GPIO45 and GPIO46 - these may be pull-up or pulled-down on your board.
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
// strapping pins: 0, 45 & 46