From 678fae6ccef96ee1f7a722d4781e18c8314e3b29 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 14 May 2018 07:11:12 -0700 Subject: Reformat 40% Ortho boards to work with Layouts feature (#2804) * Reformat 40% Ortho boards to work with Layouts feature * Fix krusli keymap to compile properly * Fix mt40 compile errors * Fix layouts * fix RGB? --- keyboards/mt40/matrix.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'keyboards/mt40/matrix.c') diff --git a/keyboards/mt40/matrix.c b/keyboards/mt40/matrix.c index 140026013..d75fcc221 100644 --- a/keyboards/mt40/matrix.c +++ b/keyboards/mt40/matrix.c @@ -19,6 +19,7 @@ along with this program. If not, see . #include #include "matrix.h" +#include "config.h" #ifndef DEBOUNCE # define DEBOUNCE 5 @@ -29,6 +30,26 @@ static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + + + void matrix_init(void) { // all outputs for rows high DDRB = 0xFF; @@ -47,6 +68,7 @@ void matrix_init(void) { matrix[row] = 0x00; matrix_debouncing[row] = 0x00; } + matrix_init_kb(); } void matrix_set_row_status(uint8_t row) { @@ -93,7 +115,7 @@ uint8_t matrix_scan(void) { } } - matrix_scan_user(); + matrix_scan_kb(); return 1; } -- cgit v1.2.3-24-g4f1b