From c0cb91de76c2223b560b529034ac075ba4d7f55a Mon Sep 17 00:00:00 2001 From: Adam Spickard Date: Mon, 22 Feb 2016 13:39:12 -0500 Subject: [PATCH] Fix for Teensy RESET key. --- keyboard/ergodox_ez/config.h | 2 ++ quantum/keymap_common.c | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/keyboard/ergodox_ez/config.h b/keyboard/ergodox_ez/config.h index 825997ba05eb..0fb1852bf467 100644 --- a/keyboard/ergodox_ez/config.h +++ b/keyboard/ergodox_ez/config.h @@ -59,6 +59,8 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +/* Must declare the TEENSY chip to have RESET key available. */ +#define TEENSY /* key combination for command */ #define IS_COMMAND() ( \ diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 6cc7adf51fde..746af40c146c 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -74,7 +74,21 @@ action_t action_for_key(uint8_t layer, keypos_t key) } else if (keycode == RESET) { // RESET is 0x5000, which is why this is here clear_keyboard(); _delay_ms(250); +// bootloader_jump doesn't work for the Teensy +#ifdef TEENSY + cli(); + UDCON = 1; + USBCON = (1<