aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/quantum.c
diff options
context:
space:
mode:
authorChristopher Browne <cbbrowne@ca.afilias.info>2016-07-15 11:19:52 -0400
committerChristopher Browne <cbbrowne@ca.afilias.info>2016-07-15 11:19:52 -0400
commitba0d81f2700cc13fcbd796ea3c46b70829066c46 (patch)
tree316aa2b26fd17e9a9df681af9cd8ab5a61a573e0 /quantum/quantum.c
parentf4fbfe6e544bb2beab05464a23ab848ae4c5578a (diff)
parent9ecf9073b96799e52a1f1c0d35b57177382902ce (diff)
downloadfirmware-ba0d81f2700cc13fcbd796ea3c46b70829066c46.tar.gz
firmware-ba0d81f2700cc13fcbd796ea3c46b70829066c46.tar.bz2
firmware-ba0d81f2700cc13fcbd796ea3c46b70829066c46.zip
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c24
1 files changed, 14 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) {
return true;
}
+void reset_keyboard(void) {
+ clear_keyboard();
+#ifdef AUDIO_ENABLE
+ stop_all_notes();
+ shutdown_user();
+#endif
+ wait_ms(250);
+#ifdef CATERINA_BOOTLOADER
+ *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
+#endif
+ bootloader_jump();
+}
+
// Shift / paren setup
#ifndef LSPO_KEY
@@ -83,16 +96,7 @@ bool process_record_quantum(keyrecord_t *record) {
switch(keycode) {
case RESET:
if (record->event.pressed) {
- clear_keyboard();
- #ifdef AUDIO_ENABLE
- stop_all_notes();
- shutdown_user();
- #endif
- wait_ms(250);
- #ifdef CATERINA_BOOTLOADER
- *(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
- #endif
- bootloader_jump();
+ reset_keyboard();
}
return false;
break;