diff options
Diffstat (limited to 'tmk_core/protocol')
-rw-r--r-- | tmk_core/protocol/vusb/main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c index 068c4d8f3d..219989876c 100644 --- a/tmk_core/protocol/vusb/main.c +++ b/tmk_core/protocol/vusb/main.c @@ -20,6 +20,9 @@ #include "timer.h" #include "uart.h" #include "debug.h" +#ifdef SLEEP_LED_ENABLE +# include "sleep_led.h" +#endif #define UART_BAUD_RATE 115200 @@ -59,6 +62,9 @@ int main(void) { initForUsbConnectivity(); keyboard_init(); +#ifdef SLEEP_LED_ENABLE + sleep_led_init(); +#endif debug("main loop\n"); while (1) { @@ -67,10 +73,16 @@ int main(void) { suspended = false; usbSofCount = 0; last_timer = timer_read(); +# ifdef SLEEP_LED_ENABLE + sleep_led_disable(); +# endif } else { // Suspend when no SOF in 3ms-10ms(7.1.7.4 Suspending of USB1.1) if (timer_elapsed(last_timer) > 5) { suspended = true; +# ifdef SLEEP_LED_ENABLE + sleep_led_enable(); +# endif /* uart_putchar('S'); _delay_ms(1); |