aboutsummaryrefslogtreecommitdiff
path: root/keyboards/dc01/left/matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/dc01/left/matrix.c')
-rw-r--r--keyboards/dc01/left/matrix.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/keyboards/dc01/left/matrix.c b/keyboards/dc01/left/matrix.c
index a3db220e4..0e7b591f8 100644
--- a/keyboards/dc01/left/matrix.c
+++ b/keyboards/dc01/left/matrix.c
@@ -42,11 +42,11 @@ static uint8_t error_count_arrow = 0;
42 42
43/* Set 0 if debouncing isn't needed */ 43/* Set 0 if debouncing isn't needed */
44 44
45#ifndef DEBOUNCING_DELAY 45#ifndef DEBOUNCE
46# define DEBOUNCING_DELAY 5 46# define DEBOUNCE 5
47#endif 47#endif
48 48
49#if (DEBOUNCING_DELAY > 0) 49#if (DEBOUNCE > 0)
50 static uint16_t debouncing_time; 50 static uint16_t debouncing_time;
51 static bool debouncing = false; 51 static bool debouncing = false;
52#endif 52#endif
@@ -169,7 +169,7 @@ uint8_t matrix_scan(void)
169 169
170 // Set row, read cols 170 // Set row, read cols
171 for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { 171 for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
172# if (DEBOUNCING_DELAY > 0) 172# if (DEBOUNCE > 0)
173 bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); 173 bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row);
174 174
175 if (matrix_changed) { 175 if (matrix_changed) {
@@ -187,7 +187,7 @@ uint8_t matrix_scan(void)
187 187
188 // Set col, read rows 188 // Set col, read rows
189 for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { 189 for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
190# if (DEBOUNCING_DELAY > 0) 190# if (DEBOUNCE > 0)
191 bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col); 191 bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col);
192 if (matrix_changed) { 192 if (matrix_changed) {
193 debouncing = true; 193 debouncing = true;
@@ -201,8 +201,8 @@ uint8_t matrix_scan(void)
201 201
202#endif 202#endif
203 203
204# if (DEBOUNCING_DELAY > 0) 204# if (DEBOUNCE > 0)
205 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { 205 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) {
206 for (uint8_t i = 0; i < MATRIX_ROWS; i++) { 206 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
207 matrix[i] = matrix_debouncing[i]; 207 matrix[i] = matrix_debouncing[i];
208 } 208 }
@@ -249,7 +249,7 @@ uint8_t matrix_scan(void)
249 249
250bool matrix_is_modified(void) 250bool matrix_is_modified(void)
251{ 251{
252#if (DEBOUNCING_DELAY > 0) 252#if (DEBOUNCE > 0)
253 if (debouncing) return false; 253 if (debouncing) return false;
254#endif 254#endif
255 return true; 255 return true;