diff options
author | Joel Challis <git@zvecr.com> | 2021-11-01 19:18:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-01 19:18:33 +0000 |
commit | 92385e30cdad61ddfc0461b1ce1340bcb494a68a (patch) | |
tree | d472f93ed9f4e42e4972630d8178a387b91a51bc /quantum/debounce/sym_eager_pr.c | |
parent | ee371c1295f00c119dd5a1bb2f3d4acedff832a7 (diff) | |
download | qmk_firmware-92385e30cdad61ddfc0461b1ce1340bcb494a68a.tar.gz qmk_firmware-92385e30cdad61ddfc0461b1ce1340bcb494a68a.zip |
Manually format develop (#15003)
Diffstat (limited to 'quantum/debounce/sym_eager_pr.c')
-rw-r--r-- | quantum/debounce/sym_eager_pr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/quantum/debounce/sym_eager_pr.c b/quantum/debounce/sym_eager_pr.c index 2ad592c5a..eda92a263 100644 --- a/quantum/debounce/sym_eager_pr.c +++ b/quantum/debounce/sym_eager_pr.c | |||
@@ -49,7 +49,7 @@ static debounce_counter_t *debounce_counters; | |||
49 | static fast_timer_t last_time; | 49 | static fast_timer_t last_time; |
50 | static bool counters_need_update; | 50 | static bool counters_need_update; |
51 | 51 | ||
52 | #define DEBOUNCE_ELAPSED 0 | 52 | # define DEBOUNCE_ELAPSED 0 |
53 | 53 | ||
54 | static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time); | 54 | static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time); |
55 | static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows); | 55 | static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows); |
@@ -71,10 +71,10 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool | |||
71 | bool updated_last = false; | 71 | bool updated_last = false; |
72 | 72 | ||
73 | if (counters_need_update) { | 73 | if (counters_need_update) { |
74 | fast_timer_t now = timer_read_fast(); | 74 | fast_timer_t now = timer_read_fast(); |
75 | fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time); | 75 | fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time); |
76 | 76 | ||
77 | last_time = now; | 77 | last_time = now; |
78 | updated_last = true; | 78 | updated_last = true; |
79 | if (elapsed_time > UINT8_MAX) { | 79 | if (elapsed_time > UINT8_MAX) { |
80 | elapsed_time = UINT8_MAX; | 80 | elapsed_time = UINT8_MAX; |
@@ -102,7 +102,7 @@ static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time) { | |||
102 | for (uint8_t row = 0; row < num_rows; row++) { | 102 | for (uint8_t row = 0; row < num_rows; row++) { |
103 | if (*debounce_pointer != DEBOUNCE_ELAPSED) { | 103 | if (*debounce_pointer != DEBOUNCE_ELAPSED) { |
104 | if (*debounce_pointer <= elapsed_time) { | 104 | if (*debounce_pointer <= elapsed_time) { |
105 | *debounce_pointer = DEBOUNCE_ELAPSED; | 105 | *debounce_pointer = DEBOUNCE_ELAPSED; |
106 | matrix_need_update = true; | 106 | matrix_need_update = true; |
107 | } else { | 107 | } else { |
108 | *debounce_pointer -= elapsed_time; | 108 | *debounce_pointer -= elapsed_time; |