From ae950bc050fc9c7ee675d0a4d52f352ebc24a369 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Thu, 21 May 2020 20:45:03 +0800 Subject: 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 --- py/objexcept.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'py/objexcept.c') 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 -- cgit v1.2.3