diff options
author | Jameson Thatcher <sireel@bluescreenofdoom.com> | 2021-07-05 00:06:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-05 09:06:40 +1000 |
commit | 550d9253b03c4273065b212d0b856a9ad07132df (patch) | |
tree | b6f351bdb7bc76298cdd844fc9bee6ba6b38906e /quantum/split_common | |
parent | 40c5f978719b5d99124f9d4c5d08818e21e7c555 (diff) | |
download | qmk_firmware-550d9253b03c4273065b212d0b856a9ad07132df.tar.gz qmk_firmware-550d9253b03c4273065b212d0b856a9ad07132df.zip |
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 <git@zvecr.com>
* 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 <git@zvecr.com>
Co-authored-by: Joel Challis <git@zvecr.com>
Diffstat (limited to 'quantum/split_common')
-rw-r--r-- | quantum/split_common/split_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 9e75e19ce..989829d2d 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) { | |||
77 | #if defined(SPLIT_HAND_PIN) | 77 | #if defined(SPLIT_HAND_PIN) |
78 | // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand | 78 | // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand |
79 | setPinInput(SPLIT_HAND_PIN); | 79 | setPinInput(SPLIT_HAND_PIN); |
80 | # ifdef SPLIT_HAND_PIN_LOW_IS_LEFT | ||
81 | return !readPin(SPLIT_HAND_PIN); | ||
82 | # else | ||
80 | return readPin(SPLIT_HAND_PIN); | 83 | return readPin(SPLIT_HAND_PIN); |
84 | # endif | ||
81 | #elif defined(SPLIT_HAND_MATRIX_GRID) | 85 | #elif defined(SPLIT_HAND_MATRIX_GRID) |
82 | # ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT | 86 | # ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT |
83 | return peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); | 87 | return peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); |