aboutsummaryrefslogtreecommitdiff
path: root/keyboards/deltasplit75/matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/deltasplit75/matrix.c')
-rw-r--r--keyboards/deltasplit75/matrix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/keyboards/deltasplit75/matrix.c b/keyboards/deltasplit75/matrix.c
index 1ac5c5039..28198d89b 100644
--- a/keyboards/deltasplit75/matrix.c
+++ b/keyboards/deltasplit75/matrix.c
@@ -37,11 +37,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
37# include "serial.h" 37# include "serial.h"
38#endif 38#endif
39 39
40#ifndef DEBOUNCING_DELAY 40#ifndef DEBOUNCE
41# define DEBOUNCING_DELAY 5 41# define DEBOUNCE 5
42#endif 42#endif
43 43
44#if (DEBOUNCING_DELAY > 0) 44#if (DEBOUNCE > 0)
45 static uint16_t debouncing_time; 45 static uint16_t debouncing_time;
46 static bool debouncing = false; 46 static bool debouncing = false;
47#endif 47#endif
@@ -140,7 +140,7 @@ uint8_t _matrix_scan(void)
140#if (DIODE_DIRECTION == COL2ROW) 140#if (DIODE_DIRECTION == COL2ROW)
141 // Set row, read cols 141 // Set row, read cols
142 for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { 142 for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
143# if (DEBOUNCING_DELAY > 0) 143# if (DEBOUNCE > 0)
144 bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); 144 bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row);
145 145
146 if (matrix_changed) { 146 if (matrix_changed) {
@@ -157,7 +157,7 @@ uint8_t _matrix_scan(void)
157#elif (DIODE_DIRECTION == ROW2COL) 157#elif (DIODE_DIRECTION == ROW2COL)
158 // Set col, read rows 158 // Set col, read rows
159 for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { 159 for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
160# if (DEBOUNCING_DELAY > 0) 160# if (DEBOUNCE > 0)
161 bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); 161 bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col);
162 if (matrix_changed) { 162 if (matrix_changed) {
163 debouncing = true; 163 debouncing = true;
@@ -170,8 +170,8 @@ uint8_t _matrix_scan(void)
170 } 170 }
171#endif 171#endif
172 172
173# if (DEBOUNCING_DELAY > 0) 173# if (DEBOUNCE > 0)
174 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { 174 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) {
175 for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { 175 for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
176 matrix[i+offset] = matrix_debouncing[i+offset]; 176 matrix[i+offset] = matrix_debouncing[i+offset];
177 } 177 }