summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/protocol')
-rw-r--r--tmk_core/protocol/chibios/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c
index 568c1edb28..dcc6d9d076 100644
--- a/tmk_core/protocol/chibios/main.c
+++ b/tmk_core/protocol/chibios/main.c
@@ -142,10 +142,15 @@ int main(void) {
/* Wait until the USB or serial link is active */
while (true) {
+#if defined(WAIT_FOR_USB) || defined(SERIAL_LINK_ENABLE)
if(USB_DRIVER.state == USB_ACTIVE) {
driver = &chibios_driver;
break;
}
+#else
+ driver = &chibios_driver;
+ break;
+#endif
#ifdef SERIAL_LINK_ENABLE
if(is_serial_link_connected()) {
driver = get_serial_link_driver();
@@ -178,6 +183,7 @@ int main(void) {
/* Main loop */
while(true) {
+#if !defined(NO_USB_STARTUP_CHECK)
if(USB_DRIVER.state == USB_SUSPENDED) {
print("[s]");
#ifdef VISUALIZER_ENABLE
@@ -205,6 +211,7 @@ int main(void) {
visualizer_resume();
#endif
}
+#endif
keyboard_task();
#ifdef CONSOLE_ENABLE