diff options
author | QMK Bot <hello@qmk.fm> | 2021-10-18 00:10:09 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2021-10-18 00:10:09 +0000 |
commit | 1a63b24548cf0891621e54772320a5fec04186cb (patch) | |
tree | 3015bda6770e0cc41c26d5599f99ea8c24eea8c9 | |
parent | ad2b017ee63ca3719ce1051b0878b7aba8fcbc92 (diff) | |
parent | 587f7508fca50b48578e61c8fb1e1972b56381e1 (diff) | |
download | qmk_firmware-1a63b24548cf0891621e54772320a5fec04186cb.tar.gz qmk_firmware-1a63b24548cf0891621e54772320a5fec04186cb.zip |
Merge remote-tracking branch 'origin/master' into develop
-rw-r--r-- | keyboards/preonic/rev3_drop/matrix.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/keyboards/preonic/rev3_drop/matrix.c b/keyboards/preonic/rev3_drop/matrix.c index 392997e0a..07171a39e 100644 --- a/keyboards/preonic/rev3_drop/matrix.c +++ b/keyboards/preonic/rev3_drop/matrix.c | |||
@@ -24,13 +24,15 @@ | |||
24 | #include "debug.h" | 24 | #include "debug.h" |
25 | #include "matrix.h" | 25 | #include "matrix.h" |
26 | 26 | ||
27 | typedef uint16_t matrix_col_t; | ||
28 | |||
27 | /* | 29 | /* |
28 | * col: { B11, B10, B2, B1, A7, B0 } | 30 | * col: { B11, B10, B2, B1, A7, B0 } |
29 | * row: { A10, A9, A8, B15, C13, C14, C15, A2 } | 31 | * row: { A10, A9, A8, B15, C13, C14, C15, A2 } |
30 | */ | 32 | */ |
31 | /* matrix state(1:on, 0:off) */ | 33 | /* matrix state(1:on, 0:off) */ |
32 | static matrix_row_t matrix[MATRIX_ROWS]; | 34 | static matrix_row_t matrix[MATRIX_ROWS]; |
33 | static matrix_row_t matrix_debouncing[MATRIX_COLS]; | 35 | static matrix_col_t matrix_debouncing[MATRIX_COLS]; |
34 | static bool debouncing = false; | 36 | static bool debouncing = false; |
35 | static uint16_t debouncing_time = 0; | 37 | static uint16_t debouncing_time = 0; |
36 | 38 | ||
@@ -66,7 +68,7 @@ void matrix_init(void) { | |||
66 | palSetPadMode(GPIOA, 6, PAL_MODE_INPUT_PULLDOWN); | 68 | palSetPadMode(GPIOA, 6, PAL_MODE_INPUT_PULLDOWN); |
67 | 69 | ||
68 | memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); | 70 | memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); |
69 | memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t)); | 71 | memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_col_t)); |
70 | 72 | ||
71 | matrix_init_quantum(); | 73 | matrix_init_quantum(); |
72 | } | 74 | } |
@@ -74,7 +76,7 @@ void matrix_init(void) { | |||
74 | uint8_t matrix_scan(void) { | 76 | uint8_t matrix_scan(void) { |
75 | // actual matrix | 77 | // actual matrix |
76 | for (int col = 0; col < MATRIX_COLS; col++) { | 78 | for (int col = 0; col < MATRIX_COLS; col++) { |
77 | matrix_row_t data = 0; | 79 | matrix_col_t data = 0; |
78 | 80 | ||
79 | // strobe col { B11, B10, B2, B1, A7, B0 } | 81 | // strobe col { B11, B10, B2, B1, A7, B0 } |
80 | switch (col) { | 82 | switch (col) { |