From 07ca35decf1a9a998b3e6bb646f7d73901e1c444 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 8 Mar 2022 10:02:28 +1100 Subject: Convert Wasdat Code custom matrix to SN74x138 driver (#16257) --- keyboards/evyd13/wasdat/matrix.c | 43 ++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'keyboards/evyd13/wasdat') diff --git a/keyboards/evyd13/wasdat/matrix.c b/keyboards/evyd13/wasdat/matrix.c index c97dd84694..60a1ea235a 100644 --- a/keyboards/evyd13/wasdat/matrix.c +++ b/keyboards/evyd13/wasdat/matrix.c @@ -24,27 +24,28 @@ along with this program. If not, see . static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; -/* col 0: C7 - * col 1: B6 - * col 2: C6 - * col 3: B4 - * col 4: B5 - * col 5: D7 +/* Columns 6-12 use a 74HC138 3-to-8 demultiplexer. * - * These columns use a 74HC138 3 to 8 bit demultiplexer. - * A2 A1 A0 - * col / pin: PD0 PD1 PD2 - * 6: 1 1 1 - * 7: 1 1 0 - * 8: 1 0 1 - * 9: 1 0 0 - * 10: 0 1 1 - * 11: 0 1 0 - * 12: 0 0 1 + * 0: C7 + * 1: B6 + * 2: C6 + * 3: B4 + * 4: B5 + * 5: D7 * - * col 13: D3 - * col 14: B7 - * col 15: B3 + * A2 A1 A0 + * D0 D1 D2 + * 6: 1 1 1 + * 7: 1 1 0 + * 8: 1 0 1 + * 9: 1 0 0 + * 10: 0 1 1 + * 11: 0 1 0 + * 12: 0 0 1 + * + * 13: D3 + * 14: B7 + * 15: B3 */ static void select_col(uint8_t col) { if (col_pins[col] != NO_PIN) { @@ -117,10 +118,10 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) } void matrix_init_custom(void) { - // initialize key pins - init_pins(); // initialize demultiplexer sn74x138_init(); + // initialize key pins + init_pins(); } bool matrix_scan_custom(matrix_row_t current_matrix[]) { -- cgit v1.2.3