mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_system: Add reset reasons for USB_UART and USB_JTAG
Merges https://github.com/espressif/esp-idf/pull/10950
This commit is contained in:
parent
690aa433a2
commit
67e9db7cf5
@ -33,6 +33,7 @@ typedef enum {
|
|||||||
ESP_RST_DEEPSLEEP, //!< Reset after exiting deep sleep mode
|
ESP_RST_DEEPSLEEP, //!< Reset after exiting deep sleep mode
|
||||||
ESP_RST_BROWNOUT, //!< Brownout reset (software or hardware)
|
ESP_RST_BROWNOUT, //!< Brownout reset (software or hardware)
|
||||||
ESP_RST_SDIO, //!< Reset over SDIO
|
ESP_RST_SDIO, //!< Reset over SDIO
|
||||||
|
ESP_RST_USB, //!< Reset by USB peripheral
|
||||||
} esp_reset_reason_t;
|
} esp_reset_reason_t;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -53,6 +53,10 @@ static esp_reset_reason_t get_reset_reason(soc_reset_reason_t rtc_reset_reason,
|
|||||||
case RESET_REASON_SYS_BROWN_OUT:
|
case RESET_REASON_SYS_BROWN_OUT:
|
||||||
return ESP_RST_BROWNOUT;
|
return ESP_RST_BROWNOUT;
|
||||||
|
|
||||||
|
case RESET_REASON_CORE_USB_UART:
|
||||||
|
case RESET_REASON_CORE_USB_JTAG:
|
||||||
|
return ESP_RST_USB;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return ESP_RST_UNKNOWN;
|
return ESP_RST_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,10 @@ static esp_reset_reason_t get_reset_reason(soc_reset_reason_t rtc_reset_reason,
|
|||||||
case RESET_REASON_SYS_BROWN_OUT:
|
case RESET_REASON_SYS_BROWN_OUT:
|
||||||
return ESP_RST_BROWNOUT;
|
return ESP_RST_BROWNOUT;
|
||||||
|
|
||||||
|
case RESET_REASON_CORE_USB_UART:
|
||||||
|
case RESET_REASON_CORE_USB_JTAG:
|
||||||
|
return ESP_RST_USB;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return ESP_RST_UNKNOWN;
|
return ESP_RST_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,10 @@ static esp_reset_reason_t get_reset_reason(soc_reset_reason_t rtc_reset_reason,
|
|||||||
case RESET_REASON_SYS_BROWN_OUT:
|
case RESET_REASON_SYS_BROWN_OUT:
|
||||||
return ESP_RST_BROWNOUT;
|
return ESP_RST_BROWNOUT;
|
||||||
|
|
||||||
|
case RESET_REASON_CORE_USB_UART:
|
||||||
|
case RESET_REASON_CORE_USB_JTAG:
|
||||||
|
return ESP_RST_USB;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return ESP_RST_UNKNOWN;
|
return ESP_RST_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,10 @@ static esp_reset_reason_t get_reset_reason(soc_reset_reason_t rtc_reset_reason,
|
|||||||
case RESET_REASON_SYS_BROWN_OUT:
|
case RESET_REASON_SYS_BROWN_OUT:
|
||||||
return ESP_RST_BROWNOUT;
|
return ESP_RST_BROWNOUT;
|
||||||
|
|
||||||
|
case RESET_REASON_CORE_USB_UART:
|
||||||
|
case RESET_REASON_CORE_USB_JTAG:
|
||||||
|
return ESP_RST_USB;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return ESP_RST_UNKNOWN;
|
return ESP_RST_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,10 @@ static esp_reset_reason_t get_reset_reason(soc_reset_reason_t rtc_reset_reason,
|
|||||||
case RESET_REASON_SYS_BROWN_OUT:
|
case RESET_REASON_SYS_BROWN_OUT:
|
||||||
return ESP_RST_BROWNOUT;
|
return ESP_RST_BROWNOUT;
|
||||||
|
|
||||||
|
case RESET_REASON_CORE_USB_UART:
|
||||||
|
case RESET_REASON_CORE_USB_JTAG:
|
||||||
|
return ESP_RST_USB;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return ESP_RST_UNKNOWN;
|
return ESP_RST_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user