aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/bpiphany/pegasushoof/2015/matrix.c12
-rw-r--r--keyboards/handwired/datahand/matrix.c15
-rw-r--r--keyboards/keyboardio/model01/matrix.c11
-rw-r--r--keyboards/matrix/noah/matrix.c11
-rw-r--r--keyboards/ymdk/sp64/matrix.c11
5 files changed, 58 insertions, 2 deletions
diff --git a/keyboards/bpiphany/pegasushoof/2015/matrix.c b/keyboards/bpiphany/pegasushoof/2015/matrix.c
index 42c5da3bc..b05869fed 100644
--- a/keyboards/bpiphany/pegasushoof/2015/matrix.c
+++ b/keyboards/bpiphany/pegasushoof/2015/matrix.c
@@ -33,6 +33,18 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
33static matrix_row_t read_cols(void); 33static matrix_row_t read_cols(void);
34static void select_row(uint8_t col); 34static void select_row(uint8_t col);
35 35
36// user-defined overridable functions
37
38__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
39
40__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
41
42__attribute__((weak)) void matrix_init_user(void) {}
43
44__attribute__((weak)) void matrix_scan_user(void) {}
45
46// helper functions
47
36inline uint8_t matrix_rows(void) 48inline uint8_t matrix_rows(void)
37{ 49{
38 return MATRIX_ROWS; 50 return MATRIX_ROWS;
diff --git a/keyboards/handwired/datahand/matrix.c b/keyboards/handwired/datahand/matrix.c
index d276c47b2..9eead28cd 100644
--- a/keyboards/handwired/datahand/matrix.c
+++ b/keyboards/handwired/datahand/matrix.c
@@ -27,6 +27,17 @@ static matrix_row_t matrix[MATRIX_ROWS];
27static matrix_row_t read_cols(void); 27static matrix_row_t read_cols(void);
28static void select_row(uint8_t row); 28static void select_row(uint8_t row);
29 29
30// user-defined overridable functions
31
32__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
33
34__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
35
36__attribute__((weak)) void matrix_init_user(void) {}
37
38__attribute__((weak)) void matrix_scan_user(void) {}
39
40// helper functions
30void matrix_init(void) { 41void matrix_init(void) {
31 /* See datahand.h for more detail on pins. */ 42 /* See datahand.h for more detail on pins. */
32 43
@@ -48,7 +59,7 @@ void matrix_init(void) {
48 /* Turn off the lock LEDs. */ 59 /* Turn off the lock LEDs. */
49 PORTF |= LED_CAPS_LOCK | LED_NUM_LOCK | LED_SCROLL_LOCK | LED_MOUSE_LOCK; 60 PORTF |= LED_CAPS_LOCK | LED_NUM_LOCK | LED_SCROLL_LOCK | LED_MOUSE_LOCK;
50 61
51 matrix_init_user(); 62 matrix_init_quantum();
52} 63}
53 64
54uint8_t matrix_scan(void) { 65uint8_t matrix_scan(void) {
@@ -62,7 +73,7 @@ uint8_t matrix_scan(void) {
62 matrix[row] = read_cols(); 73 matrix[row] = read_cols();
63 } 74 }
64 75
65 matrix_scan_user(); 76 matrix_scan_quantum();
66 77
67 return 1; 78 return 1;
68} 79}
diff --git a/keyboards/keyboardio/model01/matrix.c b/keyboards/keyboardio/model01/matrix.c
index 450e48d94..524ec9bdc 100644
--- a/keyboards/keyboardio/model01/matrix.c
+++ b/keyboards/keyboardio/model01/matrix.c
@@ -25,6 +25,17 @@
25static matrix_row_t rows[MATRIX_ROWS]; 25static matrix_row_t rows[MATRIX_ROWS];
26#define ROWS_PER_HAND (MATRIX_ROWS / 2) 26#define ROWS_PER_HAND (MATRIX_ROWS / 2)
27 27
28// user-defined overridable functions
29
30__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
31
32__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
33
34__attribute__((weak)) void matrix_init_user(void) {}
35
36__attribute__((weak)) void matrix_scan_user(void) {}
37
38// helper functions
28inline 39inline
29uint8_t matrix_rows(void) { 40uint8_t matrix_rows(void) {
30 return MATRIX_ROWS; 41 return MATRIX_ROWS;
diff --git a/keyboards/matrix/noah/matrix.c b/keyboards/matrix/noah/matrix.c
index 94a27b181..17f7a2fb6 100644
--- a/keyboards/matrix/noah/matrix.c
+++ b/keyboards/matrix/noah/matrix.c
@@ -26,6 +26,17 @@ static matrix_row_t matrix_debouncing[MATRIX_COLS];
26static bool debouncing = false; 26static bool debouncing = false;
27static uint16_t debouncing_time = 0; 27static uint16_t debouncing_time = 0;
28 28
29// user-defined overridable functions
30
31__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
32
33__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
34
35__attribute__((weak)) void matrix_init_user(void) {}
36
37__attribute__((weak)) void matrix_scan_user(void) {}
38
39// helper functions
29void matrix_init(void) 40void matrix_init(void)
30{ 41{
31 //debug_enable = true; 42 //debug_enable = true;
diff --git a/keyboards/ymdk/sp64/matrix.c b/keyboards/ymdk/sp64/matrix.c
index 74bddc057..9a6e37bcd 100644
--- a/keyboards/ymdk/sp64/matrix.c
+++ b/keyboards/ymdk/sp64/matrix.c
@@ -38,6 +38,17 @@ static void matrix_select_row(uint8_t row);
38static uint8_t mcp23018_reset_loop = 0; 38static uint8_t mcp23018_reset_loop = 0;
39#endif 39#endif
40 40
41// user-defined overridable functions
42
43__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
44
45__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
46
47__attribute__((weak)) void matrix_init_user(void) {}
48
49__attribute__((weak)) void matrix_scan_user(void) {}
50
51// helper functions
41void matrix_init(void) 52void matrix_init(void)
42{ 53{
43 // all outputs for rows high 54 // all outputs for rows high