diff options
author | Garrett Singer <gesinger@gmail.com> | 2019-08-04 00:26:02 -0400 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-08-03 21:26:02 -0700 |
commit | f644db042c488a19c2256c9f3870b5bd331cc98c (patch) | |
tree | d2c590fb7f6dc2dd92b3a24d39c842bce20f04d7 /quantum/split_common/matrix.c | |
parent | 465acd4d09fbf429ebd5894d13ae43a55c6777ee (diff) | |
download | qmk_firmware-f644db042c488a19c2256c9f3870b5bd331cc98c.tar.gz qmk_firmware-f644db042c488a19c2256c9f3870b5bd331cc98c.zip |
[Split] Add config option for DIRECT_PINS_RIGHT (#6479)
Adds support for different direct pin mappings on the halves of a split keyboard.
Diffstat (limited to 'quantum/split_common/matrix.c')
-rw-r--r-- | quantum/split_common/matrix.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 41a15ace4..e0f094e34 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c | |||
@@ -252,6 +252,14 @@ void matrix_init(void) { | |||
252 | 252 | ||
253 | // Set pinout for right half if pinout for that half is defined | 253 | // Set pinout for right half if pinout for that half is defined |
254 | if (!isLeftHand) { | 254 | if (!isLeftHand) { |
255 | #ifdef DIRECT_PINS_RIGHT | ||
256 | const pin_t direct_pins_right[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS_RIGHT; | ||
257 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | ||
258 | for (uint8_t j = 0; j < MATRIX_COLS; j++) { | ||
259 | direct_pins[i][j] = direct_pins_right[i][j]; | ||
260 | } | ||
261 | } | ||
262 | #endif | ||
255 | #ifdef MATRIX_ROW_PINS_RIGHT | 263 | #ifdef MATRIX_ROW_PINS_RIGHT |
256 | const pin_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT; | 264 | const pin_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT; |
257 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { | 265 | for (uint8_t i = 0; i < MATRIX_ROWS; i++) { |