1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

Merge pull request #1495 from hallard/master

Added function to return reset reason in human readable format
This commit is contained in:
Ivan Grokhotkov
2016-01-25 09:23:41 +03:00
5 changed files with 33 additions and 7 deletions

View File

@ -23,13 +23,13 @@
#endif
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
REASON_DEFAULT_RST = 0, /* normal startup by power on */
REASON_WDT_RST = 1, /* hardware watch dog reset */
REASON_EXCEPTION_RST = 2, /* exception reset, GPIO status wont change */
REASON_SOFT_WDT_RST = 3, /* software watch dog reset, GPIO status wont change */
REASON_SOFT_RESTART = 4, /* software restart ,system_restart , GPIO status wont change */
REASON_DEEP_SLEEP_AWAKE = 5, /* wake up from deep-sleep */
REASON_EXT_SYS_RST = 6 /* external system reset */
};
struct rst_info{