summaryrefslogtreecommitdiff
path: root/platforms/avr/bootloaders/halfkay.c
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2022-05-29 07:57:11 +1000
committerNick Brassel <nick@tzarc.org>2022-05-29 07:57:11 +1000
commitb835171008eaeaa992a1b8e390af8bce6f5f0b8f (patch)
treede22c239cc47556f8be7538f95f48ad75b86d110 /platforms/avr/bootloaders/halfkay.c
parentf5d091a9d58c8349437e9d52de87294258cbd256 (diff)
parent0c8f78020d01ee5c45481d7d93b9b0d9f7b95103 (diff)
Merge branch 'develop' -- breaking changes 2022-05-28.
Diffstat (limited to 'platforms/avr/bootloaders/halfkay.c')
-rw-r--r--platforms/avr/bootloaders/halfkay.c10
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) {
+ }
+}