aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--quantum/quantum.c24
-rw-r--r--quantum/quantum.h2
2 files changed, 16 insertions, 10 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index d5b9753b7..bc2da510f 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -15,6 +15,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
15 return true; 15 return true;
16} 16}
17 17
18void reset_keyboard(void) {
19 clear_keyboard();
20#ifdef AUDIO_ENABLE
21 stop_all_notes();
22 shutdown_user();
23#endif
24 wait_ms(250);
25#ifdef CATERINA_BOOTLOADER
26 *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
27#endif
28 bootloader_jump();
29}
30
18// Shift / paren setup 31// Shift / paren setup
19 32
20#ifndef LSPO_KEY 33#ifndef LSPO_KEY
@@ -83,16 +96,7 @@ bool process_record_quantum(keyrecord_t *record) {
83 switch(keycode) { 96 switch(keycode) {
84 case RESET: 97 case RESET:
85 if (record->event.pressed) { 98 if (record->event.pressed) {
86 clear_keyboard(); 99 reset_keyboard();
87 #ifdef AUDIO_ENABLE
88 stop_all_notes();
89 shutdown_user();
90 #endif
91 wait_ms(250);
92 #ifdef CATERINA_BOOTLOADER
93 *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
94 #endif
95 bootloader_jump();
96 } 100 }
97 return false; 101 return false;
98 break; 102 break;
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 3a0b74202..7ebfb24e3 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -77,6 +77,8 @@ bool process_action_kb(keyrecord_t *record);
77bool process_record_kb(uint16_t keycode, keyrecord_t *record); 77bool process_record_kb(uint16_t keycode, keyrecord_t *record);
78bool process_record_user(uint16_t keycode, keyrecord_t *record); 78bool process_record_user(uint16_t keycode, keyrecord_t *record);
79 79
80void reset_keyboard(void);
81
80void startup_user(void); 82void startup_user(void);
81void shutdown_user(void); 83void shutdown_user(void);
82 84