Skip to content

Commit

Permalink
[Split] Add config option for DIRECT_PINS_RIGHT (qmk#6479)
Browse files Browse the repository at this point in the history
Adds support for different direct pin mappings on the halves of a split keyboard.
  • Loading branch information
gesinger authored and fdidron committed Aug 13, 2019
1 parent d6fe489 commit 31b5a5c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions quantum/split_common/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,14 @@ void matrix_init(void) {

// Set pinout for right half if pinout for that half is defined
if (!isLeftHand) {
#ifdef DIRECT_PINS_RIGHT
const pin_t direct_pins_right[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS_RIGHT;
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
for (uint8_t j = 0; j < MATRIX_COLS; j++) {
direct_pins[i][j] = direct_pins_right[i][j];
}
}
#endif
#ifdef MATRIX_ROW_PINS_RIGHT
const pin_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT;
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
Expand Down

0 comments on commit 31b5a5c

Please sign in to comment.