Advanced options only on IDF 5.1+

This commit is contained in:
Edward Firmo 2024-11-07 22:15:29 +01:00
parent 18fdf222f1
commit 8e3eee9eb5

View file

@ -62,7 +62,7 @@ std::string DebugComponent::get_reset_reason_() {
reset_reason = "Reset over SDIO";
break;
#ifdef USE_ESP32_VARIANT_ESP32
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 5))
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 0))
case ESP_RST_USB:
reset_reason = "Reset by USB peripheral";
break;
@ -78,7 +78,7 @@ std::string DebugComponent::get_reset_reason_() {
case ESP_RST_CPU_LOCKUP:
reset_reason = "Reset due to CPU lock up (double exception)";
break;
#endif // ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 4, 5)
#endif // ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 0)
#endif // USE_ESP32_VARIANT_ESP32
default: // Includes ESP_RST_UNKNOWN
switch (rtc_get_reset_reason(0)) {
@ -347,4 +347,4 @@ void DebugComponent::update_platform_() {
} // namespace debug
} // namespace esphome
#endif
#endif // USE_ESP32