summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-10-25 22:08:49 -0700
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2018-10-28 08:44:58 -0700
commitd29a61e9ce39947cc2618c5d19d36f063bb0255b (patch)
treecdb71adb0b562a6c82ff503bfcc7d3cc0a75cbe5 /users
parentba7a1e89769049ba24de92e6538875803079a702 (diff)
Add Bootmagic Lite for now
Diffstat (limited to 'users')
-rw-r--r--users/drashna/config.h9
-rw-r--r--users/drashna/drashna.c19
-rw-r--r--users/drashna/drashna.h1
3 files changed, 27 insertions, 2 deletions
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 4545b34ef6..0d41359cca 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -73,4 +73,11 @@
#define MACRO_TIMER 5
-
+#if !defined(BOOTMAGIC_LITE) && !defined(BOOTMAGIC_ENABLE)
+#ifndef BOOTMAGIC_LITE_COLUMN
+ #define BOOTMAGIC_LITE_COLUMN 0
+#endif
+#ifndef BOOTMAGIC_LITE_ROW
+ #define BOOTMAGIC_LITE_ROW 0
+#endif
+#endif
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 5b9957c3da..35fa15be47 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -81,6 +81,21 @@ bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t thi
return false;
}
+void bootmagic_lite(void) {
+ matrix_scan();
+ #if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0
+ wait_ms(DEBOUNCING_DELAY * 2);
+ #elif defined(DEBOUNCE) && DEBOUNCE > 0
+ wait_ms(DEBOUNCE * 2);
+ #else
+ wait_ms(30);
+ #endif
+ matrix_scan();
+ if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
+ bootloader_jump();
+ }
+}
+
// Add reconfigurable functions here, for keymap customization
// This allows for a global, userspace functions, and continued
// customization of the keymap. Use _keymap instead of _user
@@ -133,6 +148,10 @@ void eeconfig_init_keymap(void) {}
// Call user matrix init, set default RGB colors and then
// call the keymap's init function
void matrix_init_user(void) {
+ #if !defined(BOOTMAGIC_LITE) && !defined(BOOTMAGIC_ENABLE)
+ bootmagic_lite();
+ #endif
+
userspace_config.raw = eeconfig_read_user();
#ifdef BOOTLOADER_CATERINA
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index 7e69a9f8d9..221a8e413e 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -353,4 +353,3 @@ NOTE: These are all the same length. If you do a search/replace
#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5
#define _________________ADJUST_R2_________________ AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN
#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT
-