From a8f9e8d24c8d75df975283afa26d1ff3285fe2b1 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 21 Aug 2022 14:49:09 +0200 Subject: [PATCH] Add more flash modes --- tasmota/tasmota_support/support_esp.ino | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tasmota/tasmota_support/support_esp.ino b/tasmota/tasmota_support/support_esp.ino index 069f68ea2..c29552cc0 100644 --- a/tasmota/tasmota_support/support_esp.ino +++ b/tasmota/tasmota_support/support_esp.ino @@ -968,10 +968,21 @@ float ESP_getFreeHeap1024(void) { } */ -const char kFlashModes[] PROGMEM = "QIO|QOUT|DIO|DOUT"; - +const char kFlashModes[] PROGMEM = "QIO|QOUT|DIO|DOUT|Fast|Slow"; +/* +typedef enum { + FM_QIO = 0x00, + FM_QOUT = 0x01, + FM_DIO = 0x02, + FM_DOUT = 0x03, + FM_FAST_READ = 0x04, + FM_SLOW_READ = 0x05, + FM_UNKNOWN = 0xff +} FlashMode_t; +*/ String ESP_getFlashChipMode(void) { - uint32_t flash_mode = ESP.getFlashChipMode() &3; + uint32_t flash_mode = ESP.getFlashChipMode(); + if (flash_mode > 5) { flash_mode = 3; } char stemp[6]; return GetTextIndexed(stemp, sizeof(stemp), flash_mode, kFlashModes); }