summaryrefslogtreecommitdiff
path: root/platforms/avr/bootloaders/halfkay.c
diff options
context:
space:
mode:
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) {
+ }
+}