1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-29 22:24:26 +00:00

[esp32] Remove IDF 4 support and clean up code (#9145)

This commit is contained in:
Jonathan Swoboda
2025-07-01 12:22:41 -04:00
committed by GitHub
parent 35de36d690
commit 3470305d9d
23 changed files with 34 additions and 267 deletions

View File

@@ -38,16 +38,12 @@ WatchdogManager::~WatchdogManager() {
void WatchdogManager::set_timeout_(uint32_t timeout_ms) {
ESP_LOGV(TAG, "Adjusting WDT to %" PRIu32 "ms", timeout_ms);
#ifdef USE_ESP32
#if ESP_IDF_VERSION_MAJOR >= 5
esp_task_wdt_config_t wdt_config = {
.timeout_ms = timeout_ms,
.idle_core_mask = (1 << SOC_CPU_CORES_NUM) - 1,
.trigger_panic = true,
};
esp_task_wdt_reconfigure(&wdt_config);
#else
esp_task_wdt_init(timeout_ms / 1000, true);
#endif // ESP_IDF_VERSION_MAJOR
#endif // USE_ESP32
#ifdef USE_RP2040