@@ -249,12 +249,10 @@ uint32_t EspClass::magicFlashChipSize(uint8_t byte) {
249
249
return (2_MB);
250
250
case 0x4 : // 32 MBit (4MB)
251
251
return (4_MB);
252
- case 0x5 : // 64 MBit (8MB)
252
+ case 0x8 : // 64 MBit (8MB)
253
253
return (8_MB);
254
- case 0x6 : // 128 MBit (16MB)
254
+ case 0x9 : // 128 MBit (16MB)
255
255
return (16_MB);
256
- case 0x7 : // 256 MBit (32MB)
257
- return (32_MB);
258
256
default : // fail?
259
257
return 0 ;
260
258
}
@@ -363,19 +361,19 @@ bool EspClass::checkFlashConfig(bool needsEquals) {
363
361
364
362
String EspClass::getResetReason (void ) {
365
363
char buff[32 ];
366
- if (resetInfo.reason == REASON_DEFAULT_RST) { // normal startup by power on
364
+ if (resetInfo.reason == REASON_DEFAULT_RST) { // normal startup by power on
367
365
strcpy_P (buff, PSTR (" Power on" ));
368
366
} else if (resetInfo.reason == REASON_WDT_RST) { // hardware watch dog reset
369
367
strcpy_P (buff, PSTR (" Hardware Watchdog" ));
370
- } else if (resetInfo.reason == REASON_EXCEPTION_RST) { // exception reset, GPIO status won’t change
368
+ } else if (resetInfo.reason == REASON_EXCEPTION_RST) { // exception reset, GPIO status won’t change
371
369
strcpy_P (buff, PSTR (" Exception" ));
372
- } else if (resetInfo.reason == REASON_SOFT_WDT_RST) { // software watch dog reset, GPIO status won’t change
370
+ } else if (resetInfo.reason == REASON_SOFT_WDT_RST) { // software watch dog reset, GPIO status won’t change
373
371
strcpy_P (buff, PSTR (" Software Watchdog" ));
374
- } else if (resetInfo.reason == REASON_SOFT_RESTART) { // software restart ,system_restart , GPIO status won’t change
372
+ } else if (resetInfo.reason == REASON_SOFT_RESTART) { // software restart ,system_restart , GPIO status won’t change
375
373
strcpy_P (buff, PSTR (" Software/System restart" ));
376
- } else if (resetInfo.reason == REASON_DEEP_SLEEP_AWAKE) { // wake up from deep-sleep
374
+ } else if (resetInfo.reason == REASON_DEEP_SLEEP_AWAKE) { // wake up from deep-sleep
377
375
strcpy_P (buff, PSTR (" Deep-Sleep Wake" ));
378
- } else if (resetInfo.reason == REASON_EXT_SYS_RST) { // external system reset
376
+ } else if (resetInfo.reason == REASON_EXT_SYS_RST) { // external system reset
379
377
strcpy_P (buff, PSTR (" External System" ));
380
378
} else {
381
379
strcpy_P (buff, PSTR (" Unknown" ));
@@ -548,5 +546,4 @@ String EspClass::getSketchMD5()
548
546
md5.calculate ();
549
547
result = md5.toString ();
550
548
return result;
551
- }
552
-
549
+ }
0 commit comments