From a6a12890037c706e67716e28e37432693ba17ace Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat, 5 Dec 2020 22:38:46 -0800 Subject: Revert back to the old matrix (Take the blue pill) (#10568) * revert back to the old matrix. * apparently I can't count, J is the 19th not the 20th column --- keyboards/duck/tcv3/matrix.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'keyboards/duck/tcv3/matrix.c') diff --git a/keyboards/duck/tcv3/matrix.c b/keyboards/duck/tcv3/matrix.c index 38bc5c8823..d2d90470a0 100644 --- a/keyboards/duck/tcv3/matrix.c +++ b/keyboards/duck/tcv3/matrix.c @@ -21,8 +21,8 @@ along with this program. If not, see . #include "util.h" #include "print.h" #include "debug.h" -#include "debounce.h" -#include "wait.h" + +static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -74,16 +74,13 @@ void matrix_init(void) { matrix_debouncing[i] = 0; } - debounce_init(MATRIX_ROWS); - matrix_init_quantum(); } -uint8_t matrix_scan(void) { - bool changed = false; - for (uint8_t col = 0; col < MATRIX_COLS; col++) { +uint8_t matrix_scan(void) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { select_col(col); - wait_us(30); + _delay_us(3); uint8_t rows = read_rows(col); @@ -92,16 +89,27 @@ uint8_t matrix_scan(void) { bool curr_bit = rows & (1<