diff options
| author | Scott Shawcroft <scott@adafruit.com> | 2021-01-31 19:45:38 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-31 19:45:38 -0800 |
| commit | 17cf03c8e41a91126a0b676cb582eea660332750 (patch) | |
| tree | e546a18f814a5289c510f4c659dd3fc27c91c793 /ports/raspberrypi/common-hal/microcontroller | |
| parent | a52395a4bb5f25c677807a6927d079d4ccc23866 (diff) | |
| parent | 34fe152fcff402a71482e5866a0f840021b44eaa (diff) | |
Merge pull request #4083 from microDev1/watchdog-rp
RP2040: Support for WatchDog
Diffstat (limited to 'ports/raspberrypi/common-hal/microcontroller')
| -rw-r--r-- | ports/raspberrypi/common-hal/microcontroller/__init__.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ports/raspberrypi/common-hal/microcontroller/__init__.c b/ports/raspberrypi/common-hal/microcontroller/__init__.c index e454ffa1b..774e313bb 100644 --- a/ports/raspberrypi/common-hal/microcontroller/__init__.c +++ b/ports/raspberrypi/common-hal/microcontroller/__init__.c @@ -112,6 +112,17 @@ const nvm_bytearray_obj_t common_hal_mcu_nvm_obj = { }; #endif +#if CIRCUITPY_WATCHDOG +// The singleton watchdog.WatchDogTimer object. +watchdog_watchdogtimer_obj_t common_hal_mcu_watchdogtimer_obj = { + .base = { + .type = &watchdog_watchdogtimer_type, + }, + .timeout = 0.0f, + .mode = WATCHDOGMODE_NONE, +}; +#endif + // This maps MCU pin names to pin objects. const mp_rom_map_elem_t mcu_pin_global_dict_table[TOTAL_GPIO_COUNT] = { { MP_ROM_QSTR(MP_QSTR_GPIO0), MP_ROM_PTR(&pin_GPIO0) }, |
