X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Fbootmagic.c;h=9f79fb8eedba647517dc4fdf054a5e395b1ca131;hb=58f3ce5254b7649774963d9f8d91816d165037c8;hp=2c1b1adfc5d6f86050f039139a81622c4c195ec7;hpb=f59c4b03facd80cab913c6612a899392dd42ebb8;p=qmk_firmware.git diff --git a/tmk_core/common/bootmagic.c b/tmk_core/common/bootmagic.c index 2c1b1adfc..9f79fb8ee 100644 --- a/tmk_core/common/bootmagic.c +++ b/tmk_core/common/bootmagic.c @@ -1,6 +1,6 @@ #include #include -#include +#include "wait.h" #include "matrix.h" #include "bootloader.h" #include "debug.h" @@ -10,7 +10,12 @@ #include "eeconfig.h" #include "bootmagic.h" +keymap_config_t keymap_config; +/** \brief Bootmagic + * + * FIXME: needs doc + */ void bootmagic(void) { /* check signature */ @@ -19,9 +24,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 */ @@ -82,10 +87,6 @@ void bootmagic(void) } eeconfig_update_keymap(keymap_config.raw); -#ifdef NKRO_ENABLE - keyboard_nkro = keymap_config.nkro; -#endif - /* default layer */ uint8_t default_layer = 0; if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_0)) { default_layer |= (1<<0); } @@ -105,6 +106,10 @@ void bootmagic(void) } } +/** \brief Scan Keycode + * + * FIXME: needs doc + */ static bool scan_keycode(uint8_t keycode) { for (uint8_t r = 0; r < MATRIX_ROWS; r++) { @@ -120,6 +125,10 @@ static bool scan_keycode(uint8_t keycode) return false; } +/** \brief Bootmagic Scan Keycode + * + * FIXME: needs doc + */ bool bootmagic_scan_keycode(uint8_t keycode) { if (!scan_keycode(BOOTMAGIC_KEY_SALT)) return false;