From 550d9253b03c4273065b212d0b856a9ad07132df Mon Sep 17 00:00:00 2001 From: Jameson Thatcher Date: Mon, 5 Jul 2021 00:06:40 +0100 Subject: Allow invert of SPLIT_HAND_PIN logic (#13433) * added support for inverting the hand pin for split keyboards * Added docs about SPLIT_HAND_LOW_IS_LEFT * Update docs/feature_split_keyboard.md bring #define for split hand pin low for left half name in line with grid pin define Co-authored-by: Joel Challis * Update quantum/split_common/split_util.c update split hand pin low is left name to match split hand grid define Co-authored-by: Joel Challis Co-authored-by: Joel Challis --- quantum/split_common/split_util.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'quantum/split_common') diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 9e75e19ce0..989829d2dc 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -77,7 +77,11 @@ __attribute__((weak)) bool is_keyboard_left(void) { #if defined(SPLIT_HAND_PIN) // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand setPinInput(SPLIT_HAND_PIN); +# ifdef SPLIT_HAND_PIN_LOW_IS_LEFT + return !readPin(SPLIT_HAND_PIN); +# else return readPin(SPLIT_HAND_PIN); +# endif #elif defined(SPLIT_HAND_MATRIX_GRID) # ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT return peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); -- cgit v1.2.3