Fix PowerOnState on ESP32 (#20144)

This commit is contained in:
Theo Arends 2023-12-02 17:49:02 +01:00
parent 050fdbf5de
commit 28c8f8cf47
1 changed files with 2 additions and 2 deletions

View File

@ -433,9 +433,9 @@ String ESP_getResetReason(void) {
uint32_t ESP_ResetInfoReason(void) {
RESET_REASON reason = rtc_get_reset_reason(0);
if (1 == reason) { return REASON_DEFAULT_RST; } // POWERON_RESET
if (12 == reason) { return REASON_SOFT_RESTART; } // SW_CPU_RESET / RTC_SW_CPU_RESET
if ((3 == reason) || (12 == reason)) { return REASON_SOFT_RESTART; } // SW_RESET / RTC_SW_SYS_RESET and SW_CPU_RESET / RTC_SW_CPU_RESET
if (5 == reason) { return REASON_DEEP_SLEEP_AWAKE; } // DEEPSLEEP_RESET
if (3 == reason) { return REASON_EXT_SYS_RST; } // SW_RESET / RTC_SW_SYS_RESET
// if (3 == reason) { return REASON_EXT_SYS_RST; } // SW_RESET / RTC_SW_SYS_RESET
return -1; //no "official error code", but should work with the current code base
}