summaryrefslogtreecommitdiff
path: root/ports/nrf/common-hal
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2020-11-19 00:29:14 -0500
committerDan Halbert <halbert@halwitz.org>2020-11-19 00:29:14 -0500
commit5bb3c321e9f19b657363e2b19a8f5b25c4d5eb49 (patch)
tree7221653786d8179ebd4a686a9deedc6d52f1f66f /ports/nrf/common-hal
parent682054a2169c108ad69e84acdb53fdd26405077e (diff)
parent8ac9b176c961faf7672f081953de6f78ec3005e2 (diff)
merge from main
Diffstat (limited to 'ports/nrf/common-hal')
-rw-r--r--ports/nrf/common-hal/watchdog/WatchDogTimer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/nrf/common-hal/watchdog/WatchDogTimer.c b/ports/nrf/common-hal/watchdog/WatchDogTimer.c
index bec0ac473..539b43e76 100644
--- a/ports/nrf/common-hal/watchdog/WatchDogTimer.c
+++ b/ports/nrf/common-hal/watchdog/WatchDogTimer.c
@@ -93,6 +93,9 @@ void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) {
}
void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) {
+ if (self->mode == WATCHDOGMODE_RESET) {
+ mp_raise_NotImplementedError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET"));
+ }
if (timer) {
timer_free();
}