summaryrefslogtreecommitdiffstats
path: root/users
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-10-27 20:53:50 +0200
committerJack Humbert <jack.humb@gmail.com>2018-10-27 20:53:50 +0200
commit4ffcacd92086870eb7a3102d54178a7af64edb0c (patch)
treeb30479a70abc0d0dcd6c287383eb64e8f2fee104 /users
parent5be438f03d0ae3ebdb9e24d249fdfd7f5c573634 (diff)
downloadqmk_firmware-4ffcacd92086870eb7a3102d54178a7af64edb0c.tar.gz
qmk_firmware-4ffcacd92086870eb7a3102d54178a7af64edb0c.tar.xz
Add Bootmagic Lite to QMK (#4215)
* Preliminary additon of bootmagic lite functionality * Cleanup code * Clean up bootmagic code * Add documentation and clean up code * Make 'lite' an option for BOOTMAGIC_ENABLE * Update Templates with note about Bootmagic Lite option * Detect Debounce variable * Make sure debounce is a non-zero number * Capitalize Bootmagic * Capitalize bootmagic * Update wording * Re-add EEPROM reset, by popular demand And add eeprom-less version to drashna userspace for his sanity * Fix spacing * Set BOOTMAGIC_ENABLE to use full/lite/off And default yes to "full" for compatibility * Add Bootmagic lite info to templates * Remove text from makefiles * Cleanup of makefile * mention yes in bootmagic docs * Wordsmitthing the docs * Fix white spaces * Readd default bootmagic setting, because it's necessary
Diffstat (limited to 'users')
-rw-r--r--users/drashna/drashna.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 5b6620cf3..7c280e2dd 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -424,3 +424,19 @@ void eeconfig_init_user(void) {
userspace_config.raw = 0;
eeconfig_update_user(userspace_config.raw);
}
+
+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();
+ }
+}