/* 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();
/* Main loop */
while(true) {
+#if !defined(NO_USB_STARTUP_CHECK)
if(USB_DRIVER.state == USB_SUSPENDED) {
print("[s]");
#ifdef VISUALIZER_ENABLE
visualizer_resume();
#endif
}
+#endif
keyboard_task();
#ifdef CONSOLE_ENABLE