diff options
Diffstat (limited to 'quantum')
-rw-r--r-- | quantum/quantum.c | 26 | ||||
-rw-r--r-- | quantum/via.c | 30 |
2 files changed, 0 insertions, 56 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index e06448d9e..749a08eea 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
@@ -581,32 +581,6 @@ void tap_random_base64(void) { | |||
581 | } | 581 | } |
582 | } | 582 | } |
583 | 583 | ||
584 | __attribute__((weak)) void bootmagic_lite(void) { | ||
585 | // The lite version of TMK's bootmagic based on Wilba. | ||
586 | // 100% less potential for accidentally making the | ||
587 | // keyboard do stupid things. | ||
588 | |||
589 | // We need multiple scans because debouncing can't be turned off. | ||
590 | matrix_scan(); | ||
591 | #if defined(DEBOUNCE) && DEBOUNCE > 0 | ||
592 | wait_ms(DEBOUNCE * 2); | ||
593 | #else | ||
594 | wait_ms(30); | ||
595 | #endif | ||
596 | matrix_scan(); | ||
597 | |||
598 | // If the Esc and space bar are held down on power up, | ||
599 | // reset the EEPROM valid state and jump to bootloader. | ||
600 | // Assumes Esc is at [0,0]. | ||
601 | // This isn't very generalized, but we need something that doesn't | ||
602 | // rely on user's keymaps in firmware or EEPROM. | ||
603 | if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { | ||
604 | eeconfig_disable(); | ||
605 | // Jump to bootloader. | ||
606 | bootloader_jump(); | ||
607 | } | ||
608 | } | ||
609 | |||
610 | void matrix_init_quantum() { | 584 | void matrix_init_quantum() { |
611 | #ifdef BOOTMAGIC_LITE | 585 | #ifdef BOOTMAGIC_LITE |
612 | bootmagic_lite(); | 586 | bootmagic_lite(); |
diff --git a/quantum/via.c b/quantum/via.c index f85af8d9e..288299ada 100644 --- a/quantum/via.c +++ b/quantum/via.c | |||
@@ -92,36 +92,6 @@ void via_eeprom_reset(void) { | |||
92 | eeconfig_disable(); | 92 | eeconfig_disable(); |
93 | } | 93 | } |
94 | 94 | ||
95 | // Override bootmagic_lite() so it can flag EEPROM as invalid | ||
96 | // as well as jump to bootloader, thus performing a "factory reset" | ||
97 | // of dynamic keymaps and optionally backlight/other settings. | ||
98 | void bootmagic_lite(void) { | ||
99 | // The lite version of TMK's bootmagic based on Wilba. | ||
100 | // 100% less potential for accidentally making the | ||
101 | // keyboard do stupid things. | ||
102 | |||
103 | // We need multiple scans because debouncing can't be turned off. | ||
104 | matrix_scan(); | ||
105 | #if defined(DEBOUNCE) && DEBOUNCE > 0 | ||
106 | wait_ms(DEBOUNCE * 2); | ||
107 | #else | ||
108 | wait_ms(30); | ||
109 | #endif | ||
110 | matrix_scan(); | ||
111 | |||
112 | // If the Esc and space bar are held down on power up, | ||
113 | // reset the EEPROM valid state and jump to bootloader. | ||
114 | // Assumes Esc is at [0,0]. | ||
115 | // This isn't very generalized, but we need something that doesn't | ||
116 | // rely on user's keymaps in firmware or EEPROM. | ||
117 | if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) { | ||
118 | // This is the only difference from the default implementation. | ||
119 | via_eeprom_reset(); | ||
120 | // Jump to bootloader. | ||
121 | bootloader_jump(); | ||
122 | } | ||
123 | } | ||
124 | |||
125 | // Override this at the keyboard code level to check | 95 | // Override this at the keyboard code level to check |
126 | // VIA's EEPROM valid state and reset to defaults as needed. | 96 | // VIA's EEPROM valid state and reset to defaults as needed. |
127 | // Used by keyboards that store their own state in EEPROM, | 97 | // Used by keyboards that store their own state in EEPROM, |