fix watchdog deinit

This commit is contained in:
microDev 2021-03-04 13:23:34 +05:30
parent dca2989df8
commit 13453d35c6
No known key found for this signature in database
GPG Key ID: 2C0867BE60967730
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}