diff options
| author | tmk <nobody@nowhere> | 2013-11-19 03:20:25 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2013-11-19 03:20:25 +0900 |
| commit | 9d40be19908394e44cdda5d3c73d21e8d3795e72 (patch) | |
| tree | 5dbfb3a3182f35a2a4a15a26736388e87c2f42d3 /protocol | |
| parent | 676d94d13791a99751cebf724fd5a56b150f344d (diff) | |
| download | qmk_firmware-9d40be19908394e44cdda5d3c73d21e8d3795e72.tar.gz qmk_firmware-9d40be19908394e44cdda5d3c73d21e8d3795e72.zip | |
Wait for USB starting up to make debug print available
Diffstat (limited to 'protocol')
| -rw-r--r-- | protocol/lufa/lufa.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/protocol/lufa/lufa.c b/protocol/lufa/lufa.c index a230d5ba2..04e8e78f3 100644 --- a/protocol/lufa/lufa.c +++ b/protocol/lufa/lufa.c | |||
| @@ -539,11 +539,18 @@ int main(void) | |||
| 539 | { | 539 | { |
| 540 | SetupHardware(); | 540 | SetupHardware(); |
| 541 | sei(); | 541 | sei(); |
| 542 | |||
| 543 | /* wait for USB startup & debug output */ | ||
| 544 | while (USB_DeviceState != DEVICE_STATE_Configured) { | ||
| 542 | #if defined(INTERRUPT_CONTROL_ENDPOINT) | 545 | #if defined(INTERRUPT_CONTROL_ENDPOINT) |
| 543 | while (USB_DeviceState != DEVICE_STATE_Configured) ; | 546 | ; |
| 547 | #else | ||
| 548 | USB_USBTask(); | ||
| 544 | #endif | 549 | #endif |
| 550 | } | ||
| 545 | print("USB configured.\n"); | 551 | print("USB configured.\n"); |
| 546 | 552 | ||
| 553 | /* init modules */ | ||
| 547 | keyboard_init(); | 554 | keyboard_init(); |
| 548 | host_set_driver(&lufa_driver); | 555 | host_set_driver(&lufa_driver); |
| 549 | #ifdef SLEEP_LED_ENABLE | 556 | #ifdef SLEEP_LED_ENABLE |
