diff options
author | Nick Brassel <nick@tzarc.org> | 2022-05-29 07:57:11 +1000 |
---|---|---|
committer | Nick Brassel <nick@tzarc.org> | 2022-05-29 07:57:11 +1000 |
commit | b835171008eaeaa992a1b8e390af8bce6f5f0b8f (patch) | |
tree | de22c239cc47556f8be7538f95f48ad75b86d110 /platforms/avr/bootloaders/halfkay.c | |
parent | f5d091a9d58c8349437e9d52de87294258cbd256 (diff) | |
parent | 0c8f78020d01ee5c45481d7d93b9b0d9f7b95103 (diff) |
Merge branch 'develop' -- breaking changes 2022-05-28.
Diffstat (limited to 'platforms/avr/bootloaders/halfkay.c')
-rw-r--r-- | platforms/avr/bootloaders/halfkay.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platforms/avr/bootloaders/halfkay.c b/platforms/avr/bootloaders/halfkay.c index 651696f988..402f5f2778 100644 --- a/platforms/avr/bootloaders/halfkay.c +++ b/platforms/avr/bootloaders/halfkay.c @@ -17,6 +17,7 @@ #include "bootloader.h" #include <avr/interrupt.h> +#include <avr/wdt.h> #include <util/delay.h> __attribute__((weak)) void bootloader_jump(void) { @@ -126,3 +127,12 @@ __attribute__((weak)) void bootloader_jump(void) { asm volatile("jmp 0x1FC00"); #endif } + +__attribute__((weak)) void mcu_reset(void) { + // setup watchdog timeout + wdt_enable(WDTO_60MS); + + // wait for watchdog timer to trigger + while (1) { + } +} |