print_set_sendchar(sendchar);
host_set_driver(&lufa_driver);
- print("\n\nKeyboard init.\n");
+ print("\n\nTMK:" STR(TMK_VERSION) "/LUFA\n\n");
hook_early_init();
keyboard_setup();
setup_usb();
keyboard_init();
+#ifndef NO_USB_STARTUP_WAIT_LOOP
/* wait for USB startup */
while (USB_DeviceState != DEVICE_STATE_Configured) {
#if defined(INTERRUPT_CONTROL_ENDPOINT)
#else
USB_USBTask();
#endif
- matrix_scan();
+ hook_usb_startup_wait_loop();
}
print("\nUSB configured.\n");
+#endif
hook_late_init();
print("\nKeyboard start.\n");
while (1) {
+#ifndef NO_USB_SUSPEND_LOOP
while (USB_DeviceState == DEVICE_STATE_Suspended) {
hook_usb_suspend_loop();
}
+#endif
keyboard_task();
// Calling long task here can prevent USB state transition
}
+
+__attribute__((weak))
+void hook_usb_startup_wait_loop(void) {}