X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=quantum%2Fsplit_common%2Fmatrix.c;h=3c3daf3d3b5edaab02de617d6f6e96148c59e44d;hb=6af77551c67c846b06c596cbd367d66c755f8051;hp=c3d2857ed50bfd9b8894817f88e76b77d305f60c;hpb=d977daa8dc9136746425f9e1414e1f93cb161877;p=qmk_firmware.git diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index c3d2857ed..3c3daf3d3 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -25,11 +25,14 @@ along with this program. If not, see . #include "matrix.h" #include "split_util.h" #include "config.h" -#include "split_flags.h" #include "quantum.h" #include "debounce.h" #include "transport.h" +#ifdef ENCODER_ENABLE + #include "encoder.h" +#endif + #if (MATRIX_COLS <= 8) # define print_matrix_header() print("\nr/c 01234567\n") # define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) @@ -143,8 +146,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) #elif (DIODE_DIRECTION == COL2ROW) static void select_row(uint8_t row) { - writePinLow(row_pins[row]); setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); } static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } @@ -188,8 +191,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) #elif (DIODE_DIRECTION == ROW2COL) static void select_col(uint8_t col) { - writePinLow(col_pins[col]); setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); } static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); } @@ -296,7 +299,7 @@ uint8_t _matrix_scan(void) { debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); - return 1; + return (uint8_t)changed; } uint8_t matrix_scan(void) { @@ -321,6 +324,9 @@ uint8_t matrix_scan(void) { matrix_scan_quantum(); } else { transport_slave(matrix + thisHand); +#ifdef ENCODER_ENABLE + encoder_read(); +#endif matrix_slave_scan_user(); }