diff options
| author | Sean Cross <sean@xobs.io> | 2020-05-22 18:52:21 +0800 |
|---|---|---|
| committer | Sean Cross <sean@xobs.io> | 2020-05-27 11:28:49 +0800 |
| commit | c7efc94a336091a1e6d79e94a9e80b31e5d5fc3f (patch) | |
| tree | 393c4f56a319dfb6c3640322f2a86879f16f1ebc /ports | |
| parent | c5c13a8ba14490c94fd7409bae0183e59b5767f4 (diff) | |
watchdog: move timeout exception to shared-bindings
Make this exception globally available to all platforms that have
enabled the watchdog timer.
Signed-off-by: Sean Cross <sean@xobs.io>
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/nrf/common-hal/watchdog/WatchDogTimer.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/ports/nrf/common-hal/watchdog/WatchDogTimer.c b/ports/nrf/common-hal/watchdog/WatchDogTimer.c index 8132ceacc..32af25866 100644 --- a/ports/nrf/common-hal/watchdog/WatchDogTimer.c +++ b/ports/nrf/common-hal/watchdog/WatchDogTimer.c @@ -50,22 +50,6 @@ STATIC nrfx_timer_t *timer = NULL; STATIC nrfx_wdt_t wdt = NRFX_WDT_INSTANCE(0); STATIC nrfx_wdt_channel_id wdt_channel_id; -const mp_obj_type_t mp_type_WatchDogTimeout = { - { &mp_type_type }, - .name = MP_QSTR_WatchDogTimeout, - .make_new = mp_obj_exception_make_new, - .attr = mp_obj_exception_attr, - .parent = &mp_type_Exception, -}; - -mp_obj_exception_t mp_watchdog_timeout_exception = { - .base.type = &mp_type_WatchDogTimeout, - .traceback_alloc = 0, - .traceback_len = 0, - .traceback_data = NULL, - .args = (mp_obj_tuple_t*)&mp_const_empty_tuple_obj, -}; - STATIC void watchdogtimer_timer_event_handler(nrf_timer_event_t event_type, void *p_context) { watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(p_context); if (event_type != NRF_TIMER_EVENT_COMPARE0) { |
