diff options
Diffstat (limited to 'tmk_core/protocol/chibios/main.c')
| -rw-r--r-- | tmk_core/protocol/chibios/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index 568c1edb2..dcc6d9d07 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c | |||
| @@ -142,10 +142,15 @@ int main(void) { | |||
| 142 | 142 | ||
| 143 | /* Wait until the USB or serial link is active */ | 143 | /* Wait until the USB or serial link is active */ |
| 144 | while (true) { | 144 | while (true) { |
| 145 | #if defined(WAIT_FOR_USB) || defined(SERIAL_LINK_ENABLE) | ||
| 145 | if(USB_DRIVER.state == USB_ACTIVE) { | 146 | if(USB_DRIVER.state == USB_ACTIVE) { |
| 146 | driver = &chibios_driver; | 147 | driver = &chibios_driver; |
| 147 | break; | 148 | break; |
| 148 | } | 149 | } |
| 150 | #else | ||
| 151 | driver = &chibios_driver; | ||
| 152 | break; | ||
| 153 | #endif | ||
| 149 | #ifdef SERIAL_LINK_ENABLE | 154 | #ifdef SERIAL_LINK_ENABLE |
| 150 | if(is_serial_link_connected()) { | 155 | if(is_serial_link_connected()) { |
| 151 | driver = get_serial_link_driver(); | 156 | driver = get_serial_link_driver(); |
| @@ -178,6 +183,7 @@ int main(void) { | |||
| 178 | /* Main loop */ | 183 | /* Main loop */ |
| 179 | while(true) { | 184 | while(true) { |
| 180 | 185 | ||
| 186 | #if !defined(NO_USB_STARTUP_CHECK) | ||
| 181 | if(USB_DRIVER.state == USB_SUSPENDED) { | 187 | if(USB_DRIVER.state == USB_SUSPENDED) { |
| 182 | print("[s]"); | 188 | print("[s]"); |
| 183 | #ifdef VISUALIZER_ENABLE | 189 | #ifdef VISUALIZER_ENABLE |
| @@ -205,6 +211,7 @@ int main(void) { | |||
| 205 | visualizer_resume(); | 211 | visualizer_resume(); |
| 206 | #endif | 212 | #endif |
| 207 | } | 213 | } |
| 214 | #endif | ||
| 208 | 215 | ||
| 209 | keyboard_task(); | 216 | keyboard_task(); |
| 210 | #ifdef CONSOLE_ENABLE | 217 | #ifdef CONSOLE_ENABLE |
