From c8d67963586eaa90b4b673a493557fe88df9febc Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 1 Mar 2018 12:36:21 +0900 Subject: [PATCH] core: lufa: Add delay for console startup --- tmk_core/protocol/lufa/lufa.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 1fd6eb34..60849aea 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -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 */ -- 2.46.2