From b624f32f944acdc59dcb130674c09090c5c404cb Mon Sep 17 00:00:00 2001 From: skullY Date: Fri, 30 Aug 2019 11:19:03 -0700 Subject: clang-format changes --- quantum/debounce/sym_g.c | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) (limited to 'quantum/debounce/sym_g.c') diff --git a/quantum/debounce/sym_g.c b/quantum/debounce/sym_g.c index c8ab34e1a0..3ed9055d2a 100644 --- a/quantum/debounce/sym_g.c +++ b/quantum/debounce/sym_g.c @@ -20,38 +20,33 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state. #include "timer.h" #include "quantum.h" #ifndef DEBOUNCE - #define DEBOUNCE 5 +# define DEBOUNCE 5 #endif -void debounce_init(uint8_t num_rows) {} +void debounce_init(uint8_t num_rows) {} static bool debouncing = false; #if DEBOUNCE > 0 static uint16_t debouncing_time; -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) -{ - if (changed) { - debouncing = true; - debouncing_time = timer_read(); - } +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { + if (changed) { + debouncing = true; + debouncing_time = timer_read(); + } - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int i = 0; i < num_rows; i++) { - cooked[i] = raw[i]; + if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + for (int i = 0; i < num_rows; i++) { + cooked[i] = raw[i]; + } + debouncing = false; } - debouncing = false; - } } -#else //no debouncing. -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) -{ - for (int i = 0; i < num_rows; i++) { - cooked[i] = raw[i]; - } +#else // no debouncing. +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { + for (int i = 0; i < num_rows; i++) { + cooked[i] = raw[i]; + } } #endif -bool debounce_active(void) { - return debouncing; -} - +bool debounce_active(void) { return debouncing; } -- cgit v1.2.3