summaryrefslogtreecommitdiffstats
path: root/quantum/split_common/matrix.c
diff options
context:
space:
mode:
authorGarrett Singer <gesinger@gmail.com>2019-08-04 00:26:02 -0400
committerDrashna Jaelre <drashna@live.com>2019-08-03 21:26:02 -0700
commitf644db042c488a19c2256c9f3870b5bd331cc98c (patch)
treed2c590fb7f6dc2dd92b3a24d39c842bce20f04d7 /quantum/split_common/matrix.c
parent465acd4d09fbf429ebd5894d13ae43a55c6777ee (diff)
[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.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c
index 41a15ace4e..e0f094e34b 100644
--- a/quantum/split_common/matrix.c
+++ b/quantum/split_common/matrix.c
@@ -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++) {