From c7efc94a336091a1e6d79e94a9e80b31e5d5fc3f Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Fri, 22 May 2020 18:52:21 +0800 Subject: 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 --- ports/nrf/common-hal/watchdog/WatchDogTimer.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'ports') 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) { -- cgit v1.2.3