From 1de02c1f15ca1c04aae0bde818b01ea40cf32120 Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 24 Sep 2010 15:01:21 +0900 Subject: add jump_bootloader. --- jump_bootloader.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 jump_bootloader.c (limited to 'jump_bootloader.c') diff --git a/jump_bootloader.c b/jump_bootloader.c new file mode 100644 index 000000000..f60c3596a --- /dev/null +++ b/jump_bootloader.c @@ -0,0 +1,35 @@ +// this code from: +// http://www.pjrc.com/teensy/jump_to_bootloader.html +#include +#include +#include + +void jump_bootloader() { + cli(); + // disable watchdog, if enabled + // disable all peripherals + UDCON = 1; + USBCON = (1<