diff options
| author | Joel Challis <git@zvecr.com> | 2020-01-15 01:58:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-15 01:58:32 +0000 |
| commit | 48cac9e3c8710ae3e27c66fbd7043f38e7c6535e (patch) | |
| tree | a34180fc73b535f3d2b8508f7267b872f0ddcb32 /quantum/split_common/matrix.c | |
| parent | 537b8713e5bc9690dca3c1ad8733132892d48ea2 (diff) | |
| download | qmk_firmware-48cac9e3c8710ae3e27c66fbd7043f38e7c6535e.tar.gz qmk_firmware-48cac9e3c8710ae3e27c66fbd7043f38e7c6535e.zip | |
Migrate more custom matrix 'lite' code to core (#7863)
* Migrate more custom matrix lite code to core
* Align function names
* fix up MATRIX_MASKED
Diffstat (limited to 'quantum/split_common/matrix.c')
| -rw-r--r-- | quantum/split_common/matrix.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 58602af85..ed1ff5acf 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c | |||
| @@ -41,8 +41,8 @@ static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; | |||
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | /* matrix state(1:on, 0:off) */ | 43 | /* matrix state(1:on, 0:off) */ |
| 44 | static matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values | 44 | extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values |
| 45 | static matrix_row_t matrix[MATRIX_ROWS]; // debounced values | 45 | extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values |
| 46 | 46 | ||
| 47 | // row offsets for each hand | 47 | // row offsets for each hand |
| 48 | uint8_t thisHand, thatHand; | 48 | uint8_t thisHand, thatHand; |
| @@ -50,12 +50,6 @@ uint8_t thisHand, thatHand; | |||
| 50 | // user-defined overridable functions | 50 | // user-defined overridable functions |
| 51 | __attribute__((weak)) void matrix_slave_scan_user(void) {} | 51 | __attribute__((weak)) void matrix_slave_scan_user(void) {} |
| 52 | 52 | ||
| 53 | // helper functions | ||
| 54 | |||
| 55 | inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } | ||
| 56 | |||
| 57 | inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } | ||
| 58 | |||
| 59 | // matrix code | 53 | // matrix code |
| 60 | 54 | ||
| 61 | #ifdef DIRECT_PINS | 55 | #ifdef DIRECT_PINS |
