File tree Expand file tree Collapse file tree 5 files changed +58
-2
lines changed
bpiphany/pegasushoof/2015 Expand file tree Collapse file tree 5 files changed +58
-2
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,18 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
33
33
static matrix_row_t read_cols (void );
34
34
static 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
+
36
48
inline uint8_t matrix_rows (void )
37
49
{
38
50
return MATRIX_ROWS ;
Original file line number Diff line number Diff line change @@ -27,6 +27,17 @@ static matrix_row_t matrix[MATRIX_ROWS];
27
27
static matrix_row_t read_cols (void );
28
28
static 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
30
41
void matrix_init (void ) {
31
42
/* See datahand.h for more detail on pins. */
32
43
@@ -48,7 +59,7 @@ void matrix_init(void) {
48
59
/* Turn off the lock LEDs. */
49
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
54
65
uint8_t matrix_scan (void ) {
@@ -62,7 +73,7 @@ uint8_t matrix_scan(void) {
62
73
matrix [row ] = read_cols ();
63
74
}
64
75
65
- matrix_scan_user ();
76
+ matrix_scan_quantum ();
66
77
67
78
return 1 ;
68
79
}
Original file line number Diff line number Diff line change 25
25
static matrix_row_t rows [MATRIX_ROWS ];
26
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
28
39
inline
29
40
uint8_t matrix_rows (void ) {
30
41
return MATRIX_ROWS ;
Original file line number Diff line number Diff line change @@ -26,6 +26,17 @@ static matrix_row_t matrix_debouncing[MATRIX_COLS];
26
26
static bool debouncing = false;
27
27
static 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
29
40
void matrix_init (void )
30
41
{
31
42
//debug_enable = true;
Original file line number Diff line number Diff line change @@ -38,6 +38,17 @@ static void matrix_select_row(uint8_t row);
38
38
static uint8_t mcp23018_reset_loop = 0 ;
39
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
41
52
void matrix_init (void )
42
53
{
43
54
// all outputs for rows high
You can’t perform that action at this time.
0 commit comments