diff options
| author | Chris Browne <cbbrowne@hpaq.int.linuxdatabases.info> | 2016-10-10 17:18:15 -0400 | 
|---|---|---|
| committer | Chris Browne <cbbrowne@hpaq.int.linuxdatabases.info> | 2016-10-10 17:18:15 -0400 | 
| commit | 4b682ea63e2b3dd0bc1132917be7985ce0da57a6 (patch) | |
| tree | 6d79874c5542148c27907511ecdb2e9e5e12b24b /tmk_core/common/bootmagic.c | |
| parent | 04759d63ef9b520fc41d76de64bb65198448fc1c (diff) | |
| parent | a9df99b81c787862dc3fa11bd854fe39e704da81 (diff) | |
| download | firmware-4b682ea63e2b3dd0bc1132917be7985ce0da57a6.tar.gz firmware-4b682ea63e2b3dd0bc1132917be7985ce0da57a6.tar.bz2 firmware-4b682ea63e2b3dd0bc1132917be7985ce0da57a6.zip  | |
Merge branch 'master' of github.com:cbbrowne/qmk_firmware
Diffstat (limited to 'tmk_core/common/bootmagic.c')
| -rw-r--r-- | tmk_core/common/bootmagic.c | 19 | 
1 files changed, 8 insertions, 11 deletions
diff --git a/tmk_core/common/bootmagic.c b/tmk_core/common/bootmagic.c index b002a5856..2c6bcbae5 100644 --- a/tmk_core/common/bootmagic.c +++ b/tmk_core/common/bootmagic.c @@ -1,6 +1,6 @@  #include <stdint.h>  #include <stdbool.h> -#include <util/delay.h> +#include "wait.h"  #include "matrix.h"  #include "bootloader.h"  #include "debug.h" @@ -10,6 +10,7 @@  #include "eeconfig.h"  #include "bootmagic.h" +keymap_config_t keymap_config;  void bootmagic(void)  { @@ -19,9 +20,9 @@ void bootmagic(void)      }      /* do scans in case of bounce */ -    print("boogmagic scan: ... "); +    print("bootmagic scan: ... ");      uint8_t scan = 100; -    while (scan--) { matrix_scan(); _delay_ms(10); } +    while (scan--) { matrix_scan(); wait_ms(10); }      print("done.\n");      /* bootmagic skip */ @@ -52,7 +53,7 @@ void bootmagic(void)              debug_config.enable = !debug_config.enable;          }      } -    eeconfig_write_debug(debug_config.raw); +    eeconfig_update_debug(debug_config.raw);      /* keymap config */      keymap_config.raw = eeconfig_read_keymap(); @@ -80,11 +81,7 @@ void bootmagic(void)      if (bootmagic_scan_keycode(BOOTMAGIC_HOST_NKRO)) {          keymap_config.nkro = !keymap_config.nkro;      } -    eeconfig_write_keymap(keymap_config.raw); - -#ifdef NKRO_ENABLE -    keyboard_nkro = keymap_config.nkro; -#endif +    eeconfig_update_keymap(keymap_config.raw);      /* default layer */      uint8_t default_layer = 0; @@ -97,7 +94,7 @@ void bootmagic(void)      if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_6)) { default_layer |= (1<<6); }      if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_7)) { default_layer |= (1<<7); }      if (default_layer) { -        eeconfig_write_default_layer(default_layer); +        eeconfig_update_default_layer(default_layer);          default_layer_set((uint32_t)default_layer);      } else {          default_layer = eeconfig_read_default_layer(); @@ -125,4 +122,4 @@ bool bootmagic_scan_keycode(uint8_t keycode)      if (!scan_keycode(BOOTMAGIC_KEY_SALT)) return false;      return scan_keycode(keycode); -} +}
\ No newline at end of file  | 
