diff options
| author | Dan Halbert <halbert@adafruit.com> | 2021-03-04 11:04:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-04 11:04:01 -0500 |
| commit | 2ae8a44b2ab28b783bb8b902c718804ee2cbc99f (patch) | |
| tree | 9f63df2c0581aa4bc74af75b79182cfaf9111ee8 | |
| parent | 627c5f5bd4b481312a39d5063c456d9f7772ff12 (diff) | |
| parent | 13453d35c6965b1594a3cea43ef3a9133f867297 (diff) | |
Merge pull request #4325 from microDev1/fix-wdt
ESP32S2: Fix watchdog deinit
| -rw-r--r-- | ports/esp32s2/common-hal/watchdog/WatchDogTimer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/esp32s2/common-hal/watchdog/WatchDogTimer.c b/ports/esp32s2/common-hal/watchdog/WatchDogTimer.c index b51a391b7..79a84ef59 100644 --- a/ports/esp32s2/common-hal/watchdog/WatchDogTimer.c +++ b/ports/esp32s2/common-hal/watchdog/WatchDogTimer.c @@ -49,7 +49,7 @@ void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) { } void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) { - if (esp_task_wdt_deinit() == ESP_OK) { + if (esp_task_wdt_delete(NULL) == ESP_OK && esp_task_wdt_deinit() == ESP_OK) { self->mode = WATCHDOGMODE_NONE; } } |
