summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorEric Tang <e_l_tang@outlook.com>2016-05-24 08:44:40 -0700
committerJack Humbert <jack.humb@gmail.com>2016-05-24 11:44:40 -0400
commit1ae6011cef2230826a9e6db6c5b638677bc640b7 (patch)
treed101c5495b8d9c0dde776d9f7d90f7aa7038483a /quantum
parent897f5b2f9d430b780149b46ba113a3fc61483b54 (diff)
Clean up #343's code (#348)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/matrix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/quantum/matrix.c b/quantum/matrix.c
index 22126aa7ae..d5fd7def8a 100644
--- a/quantum/matrix.c
+++ b/quantum/matrix.c
@@ -37,10 +37,8 @@ static const io_pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
/* matrix state */
#if DIODE_DIRECTION == COL2ROW
static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t debouncing_matrix[MATRIX_ROWS];
#else
static matrix_col_t matrix[MATRIX_COLS];
-static matrix_col_t debouncing_matrix[MATRIX_COLS];
#endif
static int8_t debouncing_delay = -1;
@@ -99,6 +97,7 @@ void matrix_init(void) {
#if DIODE_DIRECTION == COL2ROW
uint8_t matrix_scan(void) {
+ static matrix_row_t debouncing_matrix[MATRIX_ROWS];
for (int8_t r = MATRIX_ROWS - 1; r >= 0; --r) {
toggle_row(r);
matrix_row_t state = read_cols();
@@ -146,6 +145,7 @@ matrix_row_t matrix_get_row(uint8_t row) {
#else
uint8_t matrix_scan(void) {
+ static matrix_col_t debouncing_matrix[MATRIX_COLS];
for (int8_t c = MATRIX_COLS - 1; c >= 0; --c) {
toggle_col(c);
matrix_col_t state = read_rows();