summaryrefslogtreecommitdiff
path: root/common/keyboard.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-03-09 11:22:27 +0900
committertmk <nobody@nowhere>2013-03-09 11:22:27 +0900
commit4d64fd8faa8b1a0ceb9019446ba6915aaf1812ea (patch)
tree25410ede4bbf7d5a8994bb385e6c7ee4ad2f4c0c /common/keyboard.c
parent359b68d35f0763ab0cafa2fb800e0a3497291f95 (diff)
downloadqmk_firmware-4d64fd8faa8b1a0ceb9019446ba6915aaf1812ea.tar.gz
qmk_firmware-4d64fd8faa8b1a0ceb9019446ba6915aaf1812ea.zip
Add bootmagic.c and fix bootloader_jump
Diffstat (limited to 'common/keyboard.c')
-rw-r--r--common/keyboard.c25
1 files changed, 2 insertions, 23 deletions
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 <http://www.gnu.org/licenses/>.
#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();
}
-
}
/*