summaryrefslogtreecommitdiff
path: root/py/objexcept.c
diff options
context:
space:
mode:
authorSean Cross <sean@xobs.io>2020-05-21 20:45:03 +0800
committerSean Cross <sean@xobs.io>2020-05-27 11:28:49 +0800
commitae950bc050fc9c7ee675d0a4d52f352ebc24a369 (patch)
tree1c92d6fab19725d5b25374b74e728243d04eed4e /py/objexcept.c
parent0169ea5155d553094d33613e94a6c597ee2e0860 (diff)
add WatchDogTimeout exception
This adds an exception to be raised when the WatchDogTimer times out. Note that this currently causes a HardFault, and it's not clear why it's not behaving properly. Signed-off-by: Sean Cross <sean@xobs.io>
Diffstat (limited to 'py/objexcept.c')
-rw-r--r--py/objexcept.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/objexcept.c b/py/objexcept.c
index b7a536c5e..db09d5153 100644
--- a/py/objexcept.c
+++ b/py/objexcept.c
@@ -256,6 +256,9 @@ const mp_obj_type_t mp_type_BaseException = {
MP_DEFINE_EXCEPTION(SystemExit, BaseException)
MP_DEFINE_EXCEPTION(KeyboardInterrupt, BaseException)
MP_DEFINE_EXCEPTION(ReloadException, BaseException)
+#if CIRCUITPY_WATCHDOG
+MP_DEFINE_EXCEPTION(WatchDogTimeout, BaseException)
+#endif
MP_DEFINE_EXCEPTION(GeneratorExit, BaseException)
MP_DEFINE_EXCEPTION(Exception, BaseException)
#if MICROPY_PY_ASYNC_AWAIT