Skip to content

Commit 13453d3

Browse files
committed
fix watchdog deinit
1 parent dca2989 commit 13453d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/esp32s2/common-hal/watchdog/WatchDogTimer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) {
4949
}
5050

5151
void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) {
52-
if (esp_task_wdt_deinit() == ESP_OK) {
52+
if (esp_task_wdt_delete(NULL) == ESP_OK && esp_task_wdt_deinit() == ESP_OK) {
5353
self->mode = WATCHDOGMODE_NONE;
5454
}
5555
}

0 commit comments

Comments
 (0)