]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
core: lufa: Add delay for console startup
authortmk <hasu@tmk-kbd.com>
Thu, 1 Mar 2018 03:36:21 +0000 (12:36 +0900)
committertmk <hasu@tmk-kbd.com>
Thu, 1 Mar 2018 03:37:50 +0000 (12:37 +0900)
tmk_core/protocol/lufa/lufa.c

index 1fd6eb34bceaa33447d2526cab1acf6c228e794b..60849aea4c935da108839c6e583d596540624719 100644 (file)
@@ -651,6 +651,17 @@ int main(void)
         USB_USBTask();
 #endif
     }
+
+    /* wait for Console startup */
+    // TODO: long delay often works anyhoo but proper startup would be better
+    uint16_t delay = 2000;
+    while (delay--) {
+#ifndef INTERRUPT_CONTROL_ENDPOINT
+        USB_USBTask();
+#endif
+        _delay_ms(1);
+    }
+
     print("USB configured.\n");
 
     /* init modules */