summaryrefslogtreecommitdiff
path: root/ports/esp32s2/common-hal/watchdog
diff options
context:
space:
mode:
authormicroDev <70126934+microDev1@users.noreply.github.com>2021-03-04 13:23:34 +0530
committermicroDev <70126934+microDev1@users.noreply.github.com>2021-03-04 13:23:34 +0530
commit13453d35c6965b1594a3cea43ef3a9133f867297 (patch)
treee2055833e70b6061b1f00d4b0012ab5accfc4ff6 /ports/esp32s2/common-hal/watchdog
parentdca2989df8e2069e07f6b6ff99d8ab41fa1fa353 (diff)
fix watchdog deinit
Diffstat (limited to 'ports/esp32s2/common-hal/watchdog')
-rw-r--r--ports/esp32s2/common-hal/watchdog/WatchDogTimer.c2
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;
}
}