summaryrefslogtreecommitdiff
path: root/shared-bindings
diff options
context:
space:
mode:
authorScott Shawcroft <scott@adafruit.com>2020-11-16 15:01:54 -0800
committerGitHub <noreply@github.com>2020-11-16 15:01:54 -0800
commit66fb0950696d5602bb2805c11a845abe07cb7c9b (patch)
tree742c7448e808867d92059841cfde8d4f1ab727d7 /shared-bindings
parentf4fd236605781e961658054af4356d22fde5e5c9 (diff)
parent146adca060d7abc76149c88c7cdd2d401f799efa (diff)
Merge pull request #3667 from microDev1/watchdog-s2
ESP32S2: Support for WatchDog
Diffstat (limited to 'shared-bindings')
-rw-r--r--shared-bindings/watchdog/WatchDogTimer.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/shared-bindings/watchdog/WatchDogTimer.c b/shared-bindings/watchdog/WatchDogTimer.c
index 09219f710..575021a21 100644
--- a/shared-bindings/watchdog/WatchDogTimer.c
+++ b/shared-bindings/watchdog/WatchDogTimer.c
@@ -66,6 +66,7 @@ STATIC mp_obj_t watchdog_watchdogtimer_feed(mp_obj_t self_in) {
if (current_mode == WATCHDOGMODE_NONE) {
mp_raise_ValueError(translate("WatchDogTimer is not currently running"));
}
+
common_hal_watchdog_feed(self);
return mp_const_none;
}
@@ -78,12 +79,6 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(watchdog_watchdogtimer_feed_obj, watchdog_watch
//|
STATIC mp_obj_t watchdog_watchdogtimer_deinit(mp_obj_t self_in) {
watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in);
- watchdog_watchdogmode_t current_mode = common_hal_watchdog_get_mode(self);
-
- if (current_mode == WATCHDOGMODE_RESET) {
- mp_raise_NotImplementedError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET"));
- }
-
common_hal_watchdog_deinit(self);
return mp_const_none;
}