Add flash mode `OPI` to Tasmota info page (#19881)

* add OPI mode to info page
This commit is contained in:
Jason2866 2023-10-30 18:27:25 +01:00 committed by GitHub
parent fdef240ea4
commit b0d5cffe16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -12,6 +12,11 @@ def FindInoNodes(env):
env.AddMethod(FindInoNodes) env.AddMethod(FindInoNodes)
# Pass flashmode at build time to macro # Pass flashmode at build time to macro
tasmota_flash_mode = "-DCONFIG_TASMOTA_FLASHMODE_" + (env.BoardConfig().get("build.flash_mode", "dio")).upper() memory_type = env.BoardConfig().get("build.arduino.memory_type", "").upper()
flash_mode = env.BoardConfig().get("build.flash_mode", "dio").upper()
if "OPI_" in memory_type:
flash_mode = "OPI"
tasmota_flash_mode = "-DCONFIG_TASMOTA_FLASHMODE_" + flash_mode
env.Append(CXXFLAGS=[tasmota_flash_mode]) env.Append(CXXFLAGS=[tasmota_flash_mode])
print(tasmota_flash_mode) print(tasmota_flash_mode)

View File

@ -74,7 +74,9 @@ String EthernetMacAddress(void);
\*-------------------------------------------------------------------------------------------*/ \*-------------------------------------------------------------------------------------------*/
// created in pio-tools/pre_source_dir.py // created in pio-tools/pre_source_dir.py
#if defined(CONFIG_TASMOTA_FLASHMODE_QIO) #if defined(CONFIG_TASMOTA_FLASHMODE_OPI)
#define D_TASMOTA_FLASHMODE "OPI"
#elif (CONFIG_TASMOTA_FLASHMODE_QIO)
#define D_TASMOTA_FLASHMODE "QIO" #define D_TASMOTA_FLASHMODE "QIO"
#elif defined(CONFIG_TASMOTA_FLASHMODE_QOUT) #elif defined(CONFIG_TASMOTA_FLASHMODE_QOUT)
#define D_TASMOTA_FLASHMODE "QOUT" #define D_TASMOTA_FLASHMODE "QOUT"