summaryrefslogtreecommitdiff
path: root/shared-bindings/microcontroller
diff options
context:
space:
mode:
authorSean Cross <sean@xobs.io>2020-05-22 12:35:29 +0800
committerSean Cross <sean@xobs.io>2020-05-27 11:28:49 +0800
commit08362c9cabce24ffdc2bd6018ab7fc3e9e6e4801 (patch)
tree8f74514dccbfd989b0abbe5b43898c371b85e834 /shared-bindings/microcontroller
parentec99dae95384fa08e4b1bc72273f1d34c6d646bb (diff)
watchdogtimer: refactor to new api
This refactors the WatchDogTimer API to use the format proposed in https://github.com/adafruit/circuitpython/pull/2933#issuecomment-632268227 Signed-off-by: Sean Cross <sean@xobs.io>
Diffstat (limited to 'shared-bindings/microcontroller')
-rw-r--r--shared-bindings/microcontroller/__init__.c2
-rw-r--r--shared-bindings/microcontroller/__init__.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/shared-bindings/microcontroller/__init__.c b/shared-bindings/microcontroller/__init__.c
index 907f1ec0a..88fe9c224 100644
--- a/shared-bindings/microcontroller/__init__.c
+++ b/shared-bindings/microcontroller/__init__.c
@@ -168,7 +168,7 @@ STATIC const mp_rom_map_elem_t mcu_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_nvm), MP_ROM_PTR(&mp_const_none_obj) },
#endif
#if CIRCUITPY_WATCHDOG
- { MP_ROM_QSTR(MP_QSTR_watchdog), MP_ROM_PTR(&common_hal_mcu_watchdog_obj) },
+ { MP_ROM_QSTR(MP_QSTR_watchdog), MP_ROM_PTR(&common_hal_mcu_watchdogtimer_obj) },
#else
{ MP_ROM_QSTR(MP_QSTR_watchdog), MP_ROM_PTR(&mp_const_none_obj) },
#endif
diff --git a/shared-bindings/microcontroller/__init__.h b/shared-bindings/microcontroller/__init__.h
index 6d61c527e..8abdff763 100644
--- a/shared-bindings/microcontroller/__init__.h
+++ b/shared-bindings/microcontroller/__init__.h
@@ -54,8 +54,8 @@ extern const nvm_bytearray_obj_t common_hal_mcu_nvm_obj;
#endif
#if CIRCUITPY_WATCHDOG
-#include "common-hal/watchdog/__init__.h"
-extern const watchdog_obj_t common_hal_mcu_watchdog_obj;
+#include "common-hal/watchdog/WatchDogTimer.h"
+extern watchdog_watchdogtimer_obj_t common_hal_mcu_watchdogtimer_obj;
#endif
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_MICROCONTROLLER___INIT___H