aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/mt40/matrix.c
diff options
context:
space:
mode:
authorGravatar Drashna Jaelre <drashna@live.com>2018-05-14 07:11:12 -0700
committerGravatar Jack Humbert <jack.humb@gmail.com>2018-05-14 10:11:12 -0400
commit678fae6ccef96ee1f7a722d4781e18c8314e3b29 (patch)
tree32641bb9b1b7533085cb59b146adddfa5bba65c3 /keyboards/mt40/matrix.c
parent38f204db3031475aef2252e1ad11e4c87fb559f1 (diff)
downloadqmk_firmware-678fae6ccef96ee1f7a722d4781e18c8314e3b29.tar.gz
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?
Diffstat (limited to 'keyboards/mt40/matrix.c')
-rw-r--r--keyboards/mt40/matrix.c24
1 files changed, 23 insertions, 1 deletions
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 <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;
}