Skip to content

Commit

Permalink
Merge branch 'mega' into colorcode-add-command
Browse files Browse the repository at this point in the history
  • Loading branch information
chromoxdor authored Nov 16, 2024
2 parents 91fd932 + 35afc25 commit 3161b14
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/src/CustomBuild/define_plugin_sets.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/src/Helpers/Hardware_GPIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
37 changes: 37 additions & 0 deletions src/src/Helpers/Hardware_device_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3161b14

Please sign in to comment.