diff --git a/src/src/CustomBuild/define_plugin_sets.h b/src/src/CustomBuild/define_plugin_sets.h index bda798b336..22eb50595f 100644 --- a/src/src/CustomBuild/define_plugin_sets.h +++ b/src/src/CustomBuild/define_plugin_sets.h @@ -2748,10 +2748,10 @@ To create/register a plugin, you have to : #define FEATURE_SETTINGS_ARCHIVE 0 #ifndef PLUGIN_BUILD_CUSTOM - #ifdef FEATURE_SERVO - #undef FEATURE_SERVO - #endif - #define FEATURE_SERVO 0 + // #ifdef FEATURE_SERVO + // #undef FEATURE_SERVO + // #endif + // #define FEATURE_SERVO 0 #endif #ifdef FEATURE_RTTTL #undef FEATURE_RTTTL @@ -3210,7 +3210,7 @@ To create/register a plugin, you have to : #endif #ifndef FEATURE_SERVO -#define FEATURE_SERVO 0 +#define FEATURE_SERVO 1 #endif #ifndef FEATURE_SETTINGS_ARCHIVE diff --git a/src/src/Helpers/Hardware_GPIO.cpp b/src/src/Helpers/Hardware_GPIO.cpp index f86d14c973..e170d212dc 100644 --- a/src/src/Helpers/Hardware_GPIO.cpp +++ b/src/src/Helpers/Hardware_GPIO.cpp @@ -259,7 +259,7 @@ bool getGpioInfo(int gpio, int& pinnr, bool& input, bool& output, bool& warning) output = false; } - if ((gpio >= 6) && (gpio <= 11)) { + if (isFlashInterfacePin_ESPEasy(gpio)) { // Connected to the integrated SPI flash. input = false; output = false; diff --git a/src/src/Helpers/Hardware_device_info.cpp b/src/src/Helpers/Hardware_device_info.cpp index 2c21db8967..08c0ff5aee 100644 --- a/src/src/Helpers/Hardware_device_info.cpp +++ b/src/src/Helpers/Hardware_device_info.cpp @@ -126,6 +126,43 @@ int32_t getPartitionInfo(ESP8266_partition_type ptype, uint32_t& address, int32_ bool isFlashInterfacePin_ESPEasy(int gpio) { #if CONFIG_IDF_TARGET_ESP32 + if (getChipFeatures().embeddedFlash || + getChipFeatures().embeddedPSRAM) { + + // See page 20: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf + if (getChipFeatures().embeddedFlash) { + // ESP32-U4WDH In-Package Flash (4 MB) + // SD_DATA_1 IO0/DI (GPIO-8) + // GPIO17 IO1/DO (GPIO-17) + // SD_DATA_0 IO2/WP# (GPIO-7) + // SD_CMD IO3/HOLD# (GPIO-11) + // SD_CLK CLK (GPIO-6) + // GPIO16 CS# (GPIO-16) + // GND VSS + // VDD_SDIO1 VDD + + if (gpio >= 6 && gpio <= 8) return true; + if (gpio == 17 || gpio == 11 || gpio == 16) return true; + } + + if (getChipFeatures().embeddedPSRAM) { + // ESP32-D0WDR2-V3 In-Package PSRAM (2 MB) + // SD_DATA_1 SIO0/SI (GPIO-8) + // SD_DATA_0 SIO1/SO (GPIO-7) + // SD_DATA_3 SIO2 (GPIO-10) + // SD_DATA_2 SIO3 (GPIO-9) + // SD_CLK SCLK (GPIO-6) + // GPIO16 CE# (GPIO-16) + // GND VSS + // VDD_SDIO1 VDD + if (gpio >= 6 && gpio <= 10) return true; + if (gpio == 16) return true; + + } + return false; + } + + // GPIO-6 ... 11: SPI flash and PSRAM // GPIO-16 & 17: CS for PSRAM, thus only unuable when PSRAM is present return (gpio) >= 6 && (gpio) <= 11;