ca66.c 659 B

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