Remove keyboard level QK_BOOT implementations (#24231)

This commit is contained in:
Joel Challis 2024-08-10 13:50:36 +01:00 committed by GitHub
parent 339b820520
commit 019b6f67b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 63 additions and 82 deletions

View file

@ -15,11 +15,7 @@
*/
#include "meira.h"
void matrix_init_kb(void)
{
debug_enable=true;
print("meira matrix_init_kb\n");
void matrix_init_kb(void) {
#ifdef WATCHDOG_ENABLE
// This is done after turning the layer LED red, if we're caught in a loop
// we should get a flashing red light
@ -37,21 +33,16 @@ void housekeeping_task_kb(void) {
#endif
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
// Test code that turns on the switch led for the key that is pressed
// set_backlight_by_keymap(record->event.key.col, record->event.key.row);
if (keycode == QK_BOOT) {
reset_keyboard_kb();
}
return process_record_user(keycode, record);
}
void reset_keyboard_kb(void){
bool shutdown_kb(bool jump_to_bootloader) {
#ifdef WATCHDOG_ENABLE
// Unconditionally run so shutdown_user can't mess up watchdog
MCUSR = 0;
wdt_disable();
wdt_reset();
#endif
xprintf("programming!\n");
reset_keyboard();
if (!shutdown_user(jump_to_bootloader)) {
return false;
}
return true;
}