Refactored bootloader jumping. Added USBaspLoader support.
This commit is contained in:
@@ -2,8 +2,9 @@
|
||||
#include <avr/io.h>
|
||||
#include <avr/interrupt.h>
|
||||
#include <util/delay.h>
|
||||
#include "bootloader.h"
|
||||
|
||||
void jump_bootloader(void) {
|
||||
void bootloader_jump(void) {
|
||||
cli();
|
||||
// disable watchdog, if enabled
|
||||
// disable all peripherals
|
||||
@@ -1,7 +0,0 @@
|
||||
/* See http://www.pjrc.com/teensy/jump_to_bootloader.html */
|
||||
#ifndef JUMP_BOOTLOADER_H
|
||||
#define JUMP_BOOTLOADER_H 1
|
||||
|
||||
void jump_bootloader(void);
|
||||
|
||||
#endif
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "jump_bootloader.h"
|
||||
#include "bootloader.h"
|
||||
#ifdef PS2_MOUSE_ENABLE
|
||||
# include "ps2_mouse.h"
|
||||
#endif
|
||||
@@ -86,7 +86,7 @@ int main(void)
|
||||
if (matrix_key_count() >= 4) {
|
||||
print("jump to bootloader...\n");
|
||||
_delay_ms(1000);
|
||||
jump_bootloader(); // not return
|
||||
bootloader_jump(); // not return
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user