]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - common/bootmagic.c
Squashed 'tmk_core/' changes from ee8c5ba..d5c5ac6
[max/tmk_keyboard.git] / common / bootmagic.c
index b002a585622029f998a94adf8d95d2fa0ce7672b..056806f23065dfec5be575e934c754e2be4312fb 100644 (file)
@@ -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"
@@ -9,7 +9,9 @@
 #include "action_layer.h"
 #include "eeconfig.h"
 #include "bootmagic.h"
+#include "hook.h"
 
+keymap_config_t keymap_config;
 
 void bootmagic(void)
 {
@@ -19,9 +21,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 */
@@ -39,6 +41,9 @@ void bootmagic(void)
         bootloader_jump();
     }
 
+    /* user-defined checks */
+    hook_bootmagic();
+
     /* debug enable */
     debug_config.raw = eeconfig_read_debug();
     if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEBUG_ENABLE)) {