Add more flash modes

This commit is contained in:
Theo Arends 2022-08-21 14:49:09 +02:00
parent e55e9d8485
commit a8f9e8d24c
1 changed files with 14 additions and 3 deletions

View File

@ -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);
}