diff options
Diffstat (limited to 'keyboards/mt40/matrix.c')
-rw-r--r-- | keyboards/mt40/matrix.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/keyboards/mt40/matrix.c b/keyboards/mt40/matrix.c index 140026013f..d75fcc221a 100644 --- a/keyboards/mt40/matrix.c +++ b/keyboards/mt40/matrix.c @@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <util/delay.h> #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; } |