aboutsummaryrefslogtreecommitdiff
path: root/quantum/debounce/sym_eager_pk.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/debounce/sym_eager_pk.c')
-rw-r--r--quantum/debounce/sym_eager_pk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/quantum/debounce/sym_eager_pk.c b/quantum/debounce/sym_eager_pk.c
index 15a3242e6..9da000ea9 100644
--- a/quantum/debounce/sym_eager_pk.c
+++ b/quantum/debounce/sym_eager_pk.c
@@ -50,7 +50,7 @@ static fast_timer_t last_time;
50static bool counters_need_update; 50static bool counters_need_update;
51static bool matrix_need_update; 51static bool matrix_need_update;
52 52
53#define DEBOUNCE_ELAPSED 0 53# define DEBOUNCE_ELAPSED 0
54 54
55static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time); 55static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time);
56static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows); 56static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows);
@@ -75,10 +75,10 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool
75 bool updated_last = false; 75 bool updated_last = false;
76 76
77 if (counters_need_update) { 77 if (counters_need_update) {
78 fast_timer_t now = timer_read_fast(); 78 fast_timer_t now = timer_read_fast();
79 fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time); 79 fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time);
80 80
81 last_time = now; 81 last_time = now;
82 updated_last = true; 82 updated_last = true;
83 if (elapsed_time > UINT8_MAX) { 83 if (elapsed_time > UINT8_MAX) {
84 elapsed_time = UINT8_MAX; 84 elapsed_time = UINT8_MAX;
@@ -107,7 +107,7 @@ static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time) {
107 for (uint8_t col = 0; col < MATRIX_COLS; col++) { 107 for (uint8_t col = 0; col < MATRIX_COLS; col++) {
108 if (*debounce_pointer != DEBOUNCE_ELAPSED) { 108 if (*debounce_pointer != DEBOUNCE_ELAPSED) {
109 if (*debounce_pointer <= elapsed_time) { 109 if (*debounce_pointer <= elapsed_time) {
110 *debounce_pointer = DEBOUNCE_ELAPSED; 110 *debounce_pointer = DEBOUNCE_ELAPSED;
111 matrix_need_update = true; 111 matrix_need_update = true;
112 } else { 112 } else {
113 *debounce_pointer -= elapsed_time; 113 *debounce_pointer -= elapsed_time;