aboutsummaryrefslogtreecommitdiff
path: root/keyboards/sx60/matrix.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/sx60/matrix.c')
-rw-r--r--keyboards/sx60/matrix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/keyboards/sx60/matrix.c b/keyboards/sx60/matrix.c
index 634a98a12..e8e9d6574 100644
--- a/keyboards/sx60/matrix.c
+++ b/keyboards/sx60/matrix.c
@@ -30,11 +30,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
30 30
31/* Set 0 if debouncing isn't needed */ 31/* Set 0 if debouncing isn't needed */
32 32
33#ifndef DEBOUNCING_DELAY 33#ifndef DEBOUNCE
34# define DEBOUNCING_DELAY 5 34# define DEBOUNCE 5
35#endif 35#endif
36 36
37#if (DEBOUNCING_DELAY > 0) 37#if (DEBOUNCE > 0)
38 static uint16_t debouncing_time; 38 static uint16_t debouncing_time;
39 static bool debouncing = false; 39 static bool debouncing = false;
40#endif 40#endif
@@ -154,7 +154,7 @@ uint8_t matrix_scan(void)
154 154
155 /* Set row, read cols */ 155 /* Set row, read cols */
156 for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { 156 for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) {
157# if (DEBOUNCING_DELAY > 0) 157# if (DEBOUNCE > 0)
158 bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); 158 bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row);
159 159
160 if (matrix_changed) { 160 if (matrix_changed) {
@@ -166,8 +166,8 @@ uint8_t matrix_scan(void)
166# endif 166# endif
167 } 167 }
168 168
169# if (DEBOUNCING_DELAY > 0) 169# if (DEBOUNCE > 0)
170 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { 170 if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) {
171 for (uint8_t i = 0; i < MATRIX_ROWS; i++) { 171 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
172 matrix[i] = matrix_debouncing[i]; 172 matrix[i] = matrix_debouncing[i];
173 } 173 }
@@ -181,7 +181,7 @@ uint8_t matrix_scan(void)
181 181
182bool matrix_is_modified(void) 182bool matrix_is_modified(void)
183{ 183{
184#if (DEBOUNCING_DELAY > 0) 184#if (DEBOUNCE > 0)
185 if (debouncing) return false; 185 if (debouncing) return false;
186#endif 186#endif
187 return true; 187 return true;