Skip to content

Commit 4b07256

Browse files
committed
adding resetInfo.reason 6
enum rst_reason { REASON_DEFAULT_RST = 0, REASON_WDT_RST = 1, REASON_EXCEPTION_RST = 2, REASON_SOFT_WDT_RST = 3, REASON_SOFT_RESTART = 4, REASON_DEEP_SLEEP_AWAKE = 5, REASON_EXT_SYS_RST = 6 };
1 parent e0b7e04 commit 4b07256

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎cores/esp8266/Esp.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ uint32_t EspClass::getFlashChipSizeByChipId(void) {
289289
String EspClass::getResetInfo(void) {
290290
if(resetInfo.reason != 0) {
291291
char buff[200];
292-
sprintf(&buff[0], "Fatal exception:%d flag:%d (%s) epc1:0x%08x epc2:0x%08x epc3:0x%08x excvaddr:0x%08x depc:0x%08x", resetInfo.exccause, resetInfo.reason, (resetInfo.reason == 0 ? "DEFAULT" : resetInfo.reason == 1 ? "WDT" : resetInfo.reason == 2 ? "EXCEPTION" : resetInfo.reason == 3 ? "SOFT_WDT" : resetInfo.reason == 4 ? "SOFT_RESTART" : resetInfo.reason == 5 ? "DEEP_SLEEP_AWAKE" : "???"), resetInfo.epc1, resetInfo.epc2, resetInfo.epc3, resetInfo.excvaddr, resetInfo.depc);
292+
sprintf(&buff[0], "Fatal exception:%d flag:%d (%s) epc1:0x%08x epc2:0x%08x epc3:0x%08x excvaddr:0x%08x depc:0x%08x", resetInfo.exccause, resetInfo.reason, (resetInfo.reason == 0 ? "DEFAULT" : resetInfo.reason == 1 ? "WDT" : resetInfo.reason == 2 ? "EXCEPTION" : resetInfo.reason == 3 ? "SOFT_WDT" : resetInfo.reason == 4 ? "SOFT_RESTART" : resetInfo.reason == 5 ? "DEEP_SLEEP_AWAKE" : resetInfo.reason == 6 ? "EXT_SYS_RST" : "???"), resetInfo.epc1, resetInfo.epc2, resetInfo.epc3, resetInfo.excvaddr, resetInfo.depc);
293293
return String(buff);
294294
}
295295
return String("flag: 0");

0 commit comments

Comments
 (0)