diff options
author | skullY <skullydazed@gmail.com> | 2019-08-30 11:19:03 -0700 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-08-30 15:01:52 -0700 |
commit | b624f32f944acdc59dcb130674c09090c5c404cb (patch) | |
tree | bc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /tmk_core/protocol/vusb/main.c | |
parent | 61af76a10d00aba185b8338604171de490a13e3b (diff) | |
download | qmk_firmware-b624f32f944acdc59dcb130674c09090c5c404cb.tar.gz |
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 86c2188c8..f8322d94a 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 |