@@ -61,7 +61,7 @@ static inline void setPinInputHigh_atomic(pin_t pin) {
61
61
62
62
#ifdef DIRECT_PINS
63
63
64
- static void init_pins (void ) {
64
+ __attribute__(( weak )) void matrix_init_pins (void ) {
65
65
for (int row = 0 ; row < MATRIX_ROWS ; row ++ ) {
66
66
for (int col = 0 ; col < MATRIX_COLS ; col ++ ) {
67
67
pin_t pin = direct_pins [row ][col ];
@@ -72,7 +72,7 @@ static void init_pins(void) {
72
72
}
73
73
}
74
74
75
- static bool read_cols_on_row (matrix_row_t current_matrix [], uint8_t current_row ) {
75
+ __attribute__(( weak )) bool matrix_read_cols_on_row (matrix_row_t current_matrix [], uint8_t current_row ) {
76
76
// Start with a clear matrix row
77
77
matrix_row_t current_row_value = 0 ;
78
78
@@ -104,14 +104,14 @@ static void unselect_rows(void) {
104
104
}
105
105
}
106
106
107
- static void init_pins (void ) {
107
+ __attribute__(( weak )) void matrix_init_pins (void ) {
108
108
unselect_rows ();
109
109
for (uint8_t x = 0 ; x < MATRIX_COLS ; x ++ ) {
110
110
setPinInputHigh_atomic (col_pins [x ]);
111
111
}
112
112
}
113
113
114
- static bool read_cols_on_row (matrix_row_t current_matrix [], uint8_t current_row ) {
114
+ __attribute__(( weak )) bool matrix_read_cols_on_row (matrix_row_t current_matrix [], uint8_t current_row ) {
115
115
// Start with a clear matrix row
116
116
matrix_row_t current_row_value = 0 ;
117
117
@@ -152,14 +152,14 @@ static void unselect_cols(void) {
152
152
}
153
153
}
154
154
155
- static void init_pins (void ) {
155
+ __attribute__(( weak )) void matrix_init_pins (void ) {
156
156
unselect_cols ();
157
157
for (uint8_t x = 0 ; x < ROWS_PER_HAND ; x ++ ) {
158
158
setPinInputHigh_atomic (row_pins [x ]);
159
159
}
160
160
}
161
161
162
- static bool read_rows_on_col (matrix_row_t current_matrix [], uint8_t current_col ) {
162
+ __attribute__(( weak )) bool matrix_read_rows_on_col (matrix_row_t current_matrix [], uint8_t current_col ) {
163
163
bool matrix_changed = false;
164
164
165
165
// Select col
@@ -233,7 +233,7 @@ void matrix_init(void) {
233
233
thatHand = ROWS_PER_HAND - thisHand ;
234
234
235
235
// initialize key pins
236
- init_pins ();
236
+ matrix_init_pins ();
237
237
238
238
// initialize matrix state: all keys off
239
239
for (uint8_t i = 0 ; i < MATRIX_ROWS ; i ++ ) {
@@ -293,12 +293,12 @@ uint8_t matrix_scan(void) {
293
293
#if defined(DIRECT_PINS ) || (DIODE_DIRECTION == COL2ROW )
294
294
// Set row, read cols
295
295
for (uint8_t current_row = 0 ; current_row < ROWS_PER_HAND ; current_row ++ ) {
296
- local_changed |= read_cols_on_row (raw_matrix , current_row );
296
+ local_changed |= matrix_read_cols_on_row (raw_matrix , current_row );
297
297
}
298
298
#elif (DIODE_DIRECTION == ROW2COL )
299
299
// Set col, read rows
300
300
for (uint8_t current_col = 0 ; current_col < MATRIX_COLS ; current_col ++ ) {
301
- local_changed |= read_rows_on_col (raw_matrix , current_col );
301
+ local_changed |= matrix_read_rows_on_col (raw_matrix , current_col );
302
302
}
303
303
#endif
304
304
0 commit comments