From 4d64fd8faa8b1a0ceb9019446ba6915aaf1812ea Mon Sep 17 00:00:00 2001 From: tmk Date: Sat, 9 Mar 2013 11:22:27 +0900 Subject: Add bootmagic.c and fix bootloader_jump --- common/keyboard.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'common/keyboard.c') diff --git a/common/keyboard.c b/common/keyboard.c index 2206f16759..0a0bacd433 100644 --- a/common/keyboard.c +++ b/common/keyboard.c @@ -28,7 +28,7 @@ along with this program. If not, see . #include "command.h" #include "util.h" #include "sendchar.h" -#include "bootloader.h" +#include "bootmagic.h" #ifdef MOUSEKEY_ENABLE #include "mousekey.h" #endif @@ -64,27 +64,7 @@ void keyboard_init(void) ps2_mouse_init(); #endif - /* matrix scan for boot magic keys */ -#ifdef DEBOUNCE - uint8_t scan = DEBOUNCE * 2; - while (scan--) { matrix_scan(); _delay_ms(1); } -#else - matrix_scan(); -#endif - - /* boot magic keys */ -#ifdef IS_BOOTMAGIC_BOOTLOADER - /* kick up bootloader */ - if (IS_BOOTMAGIC_BOOTLOADER()) bootloader_jump(); -#endif -#ifdef IS_BOOTMAGIC_DEBUG - if (IS_BOOTMAGIC_DEBUG()) { - eeconfig_write_debug(eeconfig_read_debug() ^ EECONFIG_DEBUG_ENABLE); - } -#endif -#ifdef IS_BOOTMAGIC_EEPROM_CLEAR - if (IS_BOOTMAGIC_EEPROM_CLEAR()) eeconfig_init(); -#endif + bootmagic(); if (eeconfig_initialized()) { uint8_t config; @@ -96,7 +76,6 @@ void keyboard_init(void) } else { eeconfig_init(); } - } /* -- cgit v1.2.3