summaryrefslogtreecommitdiff
path: root/keyboards/handwired
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-09-05 22:36:16 +0000
committerQMK Bot <hello@qmk.fm>2021-09-05 22:36:16 +0000
commitd72f29556a2bc113f30291b87293d63c9efab965 (patch)
treec5bed47c2da94a7da592b8e4375583de5c0a49f1 /keyboards/handwired
parent147289e173999b132f1b97835f8d57716a2bd376 (diff)
parent1e1be4c229651703ef7c62784b704a859a3d13cf (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/handwired')
-rw-r--r--keyboards/handwired/datahand/matrix.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/keyboards/handwired/datahand/matrix.c b/keyboards/handwired/datahand/matrix.c
index d276c47b2b..9eead28cd6 100644
--- a/keyboards/handwired/datahand/matrix.c
+++ b/keyboards/handwired/datahand/matrix.c
@@ -27,6 +27,17 @@ static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t read_cols(void);
static void select_row(uint8_t row);
+// user-defined overridable functions
+
+__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) {}
+
+// helper functions
void matrix_init(void) {
/* See datahand.h for more detail on pins. */
@@ -48,7 +59,7 @@ void matrix_init(void) {
/* Turn off the lock LEDs. */
PORTF |= LED_CAPS_LOCK | LED_NUM_LOCK | LED_SCROLL_LOCK | LED_MOUSE_LOCK;
- matrix_init_user();
+ matrix_init_quantum();
}
uint8_t matrix_scan(void) {
@@ -62,7 +73,7 @@ uint8_t matrix_scan(void) {
matrix[row] = read_cols();
}
- matrix_scan_user();
+ matrix_scan_quantum();
return 1;
}