]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/ca66/ca66.c
Added bootmagic_lite() (#2942)
[qmk_firmware.git] / keyboards / ca66 / ca66.c
1 #include "ca66.h"
2 #include "config.h"
3
4 void bootmagic_lite(void)
5 {
6         // The lite version of TMK's bootmagic.
7         // 100% less potential for accidentally making the
8         // keyboard do stupid things.
9
10         // We need multiple scans because debouncing can't be turned off.
11         matrix_scan();
12         wait_ms(DEBOUNCING_DELAY);
13         matrix_scan();
14
15         // If the Esc (matrix 0,0) is held down on power up,
16         // reset the EEPROM valid state and jump to bootloader.
17         if ( matrix_get_row(0) & (1<<0) )
18         {
19                 // Set the TMK/QMK EEPROM state as invalid.
20                 eeconfig_disable();
21                 // Jump to bootloader.
22                 bootloader_jump();
23         }
24 }
25
26 void matrix_init_kb(void)
27 {
28         bootmagic_lite();
29         matrix_init_user();
30 }