Improve and Cleanup Shutdown callbacks (#21060)
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
This commit is contained in:
parent
4601f339e4
commit
3ef06aa732
79 changed files with 277 additions and 1684 deletions
|
@ -73,8 +73,13 @@ void keyboard_post_init_user(void) {
|
|||
void rgb_matrix_update_pwm_buffers(void);
|
||||
#endif
|
||||
|
||||
__attribute__((weak)) void shutdown_keymap(void) {}
|
||||
void shutdown_user(void) {
|
||||
__attribute__((weak)) bool shutdown_keymap(bool jump_to_bootloader) {
|
||||
return true;
|
||||
}
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
if (!shutdown_keymap(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(1);
|
||||
|
@ -87,8 +92,7 @@ void shutdown_user(void) {
|
|||
#ifdef OLED_ENABLE
|
||||
oled_off();
|
||||
#endif
|
||||
|
||||
shutdown_keymap();
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void suspend_power_down_keymap(void) {}
|
||||
|
@ -268,11 +272,6 @@ void matrix_slave_scan_user(void) {
|
|||
|
||||
__attribute__((weak)) void housekeeping_task_keymap(void) {}
|
||||
void housekeeping_task_user(void) {
|
||||
static bool has_ran_yet;
|
||||
if (!has_ran_yet) {
|
||||
has_ran_yet = true;
|
||||
startup_user();
|
||||
}
|
||||
#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
|
||||
run_diablo_macro_check();
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue