core: lufa: Fix wait for console startup
This commit is contained in:
parent
5b9da20efa
commit
b7d80d8b0e
1 changed files with 12 additions and 8 deletions
|
|
@ -634,15 +634,19 @@ int main(void)
|
||||||
keyboard_init();
|
keyboard_init();
|
||||||
|
|
||||||
/* wait for Console startup */
|
/* wait for Console startup */
|
||||||
// TODO: long delay often works anyhoo but proper startup would be better
|
// TODO: 2000ms delay often works anyhoo but proper startup would be better
|
||||||
// 1000ms delay of hid_listen may affect this
|
// 1000ms delay of hid_listen affects this probably
|
||||||
uint16_t delay = 2000;
|
#ifdef CONSOLE_ENABLE
|
||||||
while (delay--) {
|
if (debug_enable) {
|
||||||
#ifndef INTERRUPT_CONTROL_ENDPOINT
|
uint16_t delay = 2000;
|
||||||
USB_USBTask();
|
while (delay--) {
|
||||||
#endif
|
#ifndef INTERRUPT_CONTROL_ENDPOINT
|
||||||
_delay_ms(1);
|
USB_USBTask();
|
||||||
|
#endif
|
||||||
|
_delay_ms(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
hook_late_init();
|
hook_late_init();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue