diff options
author | skullY <skullydazed@gmail.com> | 2019-08-30 11:19:03 -0700 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2019-09-17 11:39:43 +0900 |
commit | f8fe33acfac01064112fd2b5da680abfb5190b97 (patch) | |
tree | fcf75ef930800a948e5a3ba015d6759889f2284d /tmk_core/protocol/vusb/main.c | |
parent | c339d670684674165b422a0168bfd2016ff2e6ef (diff) |
clang-format changes
Diffstat (limited to 'tmk_core/protocol/vusb/main.c')
-rw-r--r-- | tmk_core/protocol/vusb/main.c | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c index 86c2188c87..f8322d94ac 100644 --- a/tmk_core/protocol/vusb/main.c +++ b/tmk_core/protocol/vusb/main.c @@ -21,19 +21,16 @@ #include "uart.h" #include "debug.h" - #define UART_BAUD_RATE 115200 - /* This is from main.c of USBaspLoader */ -static void initForUsbConnectivity(void) -{ +static void initForUsbConnectivity(void) { uint8_t i = 0; usbInit(); /* enforce USB re-enumerate: */ - usbDeviceDisconnect(); /* do this while interrupts are disabled */ - while(--i){ /* fake USB disconnect for > 250 ms */ + usbDeviceDisconnect(); /* do this while interrupts are disabled */ + while (--i) { /* fake USB disconnect for > 250 ms */ wdt_reset(); _delay_ms(1); } @@ -41,8 +38,7 @@ static void initForUsbConnectivity(void) sei(); } -int main(void) -{ +int main(void) { bool suspended = false; #if USB_COUNT_SOF uint16_t last_timer = timer_read(); @@ -68,26 +64,26 @@ int main(void) while (1) { #if USB_COUNT_SOF if (usbSofCount != 0) { - suspended = false; + suspended = false; usbSofCount = 0; - last_timer = timer_read(); + last_timer = timer_read(); } else { // Suspend when no SOF in 3ms-10ms(7.1.7.4 Suspending of USB1.1) if (timer_elapsed(last_timer) > 5) { suspended = true; -/* - uart_putchar('S'); - _delay_ms(1); - cli(); - set_sleep_mode(SLEEP_MODE_PWR_DOWN); - sleep_enable(); - sleep_bod_disable(); - sei(); - sleep_cpu(); - sleep_disable(); - _delay_ms(10); - uart_putchar('W'); -*/ + /* + uart_putchar('S'); + _delay_ms(1); + cli(); + set_sleep_mode(SLEEP_MODE_PWR_DOWN); + sleep_enable(); + sleep_bod_disable(); + sei(); + sleep_cpu(); + sleep_disable(); + _delay_ms(10); + uart_putchar('W'); + */ } } #endif |