summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Singer <gesinger@gmail.com>2019-08-04 00:26:02 -0400
committerFlorian Didron <fdidron@users.noreply.github.com>2019-08-13 10:46:11 +0900
commit31b5a5c22f1a7e84ce2d352a2e41d66d8f4ec033 (patch)
tree905cc915ce61b4f82ee2bb2f069ef829b1f2e383
parentd6fe48954e26306a9512052bbfa55c922ad0e3ce (diff)
[Split] Add config option for DIRECT_PINS_RIGHT (#6479)
Adds support for different direct pin mappings on the halves of a split keyboard.
-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++) {