aboutsummaryrefslogtreecommitdiff
path: root/users/kuchosauronad0
diff options
context:
space:
mode:
authorDrashna Jaelre <[email protected]>2023-11-26 03:59:18 -0800
committerGitHub <[email protected]>2023-11-26 22:59:18 +1100
commit3ef06aa732ce8063e11b2f983592529883f7ecbc (patch)
tree7fa143f938e711b6db1c2ed40c36298b8f7604c7 /users/kuchosauronad0
parent4601f339e48b0116ca139dd06ce55ef0b9ed598f (diff)
downloadqmk_firmware-3ef06aa732ce8063e11b2f983592529883f7ecbc.tar.gz
qmk_firmware-3ef06aa732ce8063e11b2f983592529883f7ecbc.zip
Improve and Cleanup Shutdown callbacks (#21060)
Co-authored-by: Dasky <[email protected]>
Diffstat (limited to 'users/kuchosauronad0')
-rw-r--r--users/kuchosauronad0/kuchosauronad0.c15
-rw-r--r--users/kuchosauronad0/kuchosauronad0.h2
2 files changed, 10 insertions, 7 deletions
diff --git a/users/kuchosauronad0/kuchosauronad0.c b/users/kuchosauronad0/kuchosauronad0.c
index 2c63eadfd1..3fc66d809b 100644
--- a/users/kuchosauronad0/kuchosauronad0.c
+++ b/users/kuchosauronad0/kuchosauronad0.c
@@ -62,11 +62,14 @@ void keyboard_post_init_user(void){
keyboard_post_init_keymap();
}
-__attribute__ ((weak))
-void shutdown_keymap(void) {}
-
-void shutdown_user (void) {
- #ifdef RGBLIGHT_ENABLE
+__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);
rgblight_setrgb(RGB_TEAL);
@@ -76,7 +79,7 @@ void shutdown_user (void) {
// rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
// while(timer_elapsed(timer_start) < 250) { wait_ms(1); }
#endif //RGB_MATRIX_ENABLE
- shutdown_keymap();
+ return true;
}
__attribute__ ((weak))
diff --git a/users/kuchosauronad0/kuchosauronad0.h b/users/kuchosauronad0/kuchosauronad0.h
index 5cbd517d67..244c3cbf55 100644
--- a/users/kuchosauronad0/kuchosauronad0.h
+++ b/users/kuchosauronad0/kuchosauronad0.h
@@ -61,7 +61,7 @@ bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed);
bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
bool send_game_macro(const char *str, keyrecord_t *record, bool override);
void matrix_init_keymap(void);
-void shutdown_keymap(void);
+bool shutdown_keymap(bool jump_to_bootloader);
void suspend_power_down_keymap(void);
void suspend_wakeup_init_keymap(void);
void matrix_scan_keymap(void);