From f644db042c488a19c2256c9f3870b5bd331cc98c Mon Sep 17 00:00:00 2001 From: Garrett Singer Date: Sun, 4 Aug 2019 00:26:02 -0400 Subject: [Split] Add config option for DIRECT_PINS_RIGHT (#6479) Adds support for different direct pin mappings on the halves of a split keyboard. --- quantum/split_common/matrix.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'quantum/split_common/matrix.c') 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) { // 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++) { -- cgit v1.2.3-70-g09d2