Update pin_manager.cpp

This commit is contained in:
wled-install
2026-02-02 20:55:38 +01:00
committed by GitHub
parent eb4bd6fbb1
commit 680ef26f4d

View File

@@ -246,11 +246,14 @@ bool PinManager::isPinOk(byte gpio, bool output)
// for classic ESP32 (non-mini) modules, these are the SPI flash pins // for classic ESP32 (non-mini) modules, these are the SPI flash pins
if (gpio > 5 && gpio < 12) return false; //SPI flash pins if (gpio > 5 && gpio < 12) return false; //SPI flash pins
} }
if ((strncmp_P(PSTR("ESP32-D0WDR2-V3"), ESP.getChipModel(), 15) == 0) || (strncmp_P(PSTR("ESP32-D0WDRH2-V3"), ESP.getChipModel(), 16) == 0)) { // allow gpio17 on modules with in-package PSRAM if (gpio == 16) return !psramFound(); // PSRAM pins on modules with off-package or in-package PSRAM
if (gpio == 16) return !psramFound(); if (gpio == 17) {
if (gpio == 17) return true; if (strncmp_P(PSTR("ESP32-D0WDR2-V3"), ESP.getChipModel(), 15) == 0) {
} else if (gpio == 16 || gpio == 17) return !psramFound(); // PSRAM pins on modules with off-package PSRAM return true;
} else {
return !psramFound(); // PSRAM pins on modules with in-package PSRAM
}
}
#endif #endif
if (output) return digitalPinCanOutput(gpio); if (output) return digitalPinCanOutput(gpio);
else return true; else return true;