diff options
author | Balz Guenat <balz.guenat@gmail.com> | 2021-11-20 18:06:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-20 09:06:08 -0800 |
commit | 32215d5bff52262542a2f8d2a221b0303f02c019 (patch) | |
tree | 4f788b0302cdda37e5f3f7165c236a3b9d85e19a /quantum/split_common | |
parent | d11d2459ce3840a4549533d1a2136044d1fa7e19 (diff) | |
download | qmk_firmware-32215d5bff52262542a2f8d2a221b0303f02c019.tar.gz qmk_firmware-32215d5bff52262542a2f8d2a221b0303f02c019.zip |
Rework encoders to enable asymmetric split keyboards (#12090)
Co-authored-by: Balz Guenat <balz.guenat@siemens.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'quantum/split_common')
-rw-r--r-- | quantum/split_common/transport.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/quantum/split_common/transport.h b/quantum/split_common/transport.h index 1d4f6ed0c..ab65ff56d 100644 --- a/quantum/split_common/transport.h +++ b/quantum/split_common/transport.h | |||
@@ -42,7 +42,11 @@ bool transport_execute_transaction(int8_t id, const void *initiator2target_buf, | |||
42 | 42 | ||
43 | #ifdef ENCODER_ENABLE | 43 | #ifdef ENCODER_ENABLE |
44 | # include "encoder.h" | 44 | # include "encoder.h" |
45 | # define NUMBER_OF_ENCODERS (sizeof((pin_t[])ENCODERS_PAD_A) / sizeof(pin_t)) | 45 | // if no pads for right half are defined, we assume the keyboard is symmetric (i.e. same pads) |
46 | # ifndef ENCODERS_PAD_A_RIGHT | ||
47 | # define ENCODERS_PAD_A_RIGHT ENCODERS_PAD_A | ||
48 | # endif | ||
49 | # define NUMBER_OF_ENCODERS ((sizeof((pin_t[])ENCODERS_PAD_A) + (sizeof((pin_t[])ENCODERS_PAD_A_RIGHT)) / sizeof(pin_t)) | ||
46 | #endif // ENCODER_ENABLE | 50 | #endif // ENCODER_ENABLE |
47 | 51 | ||
48 | #ifdef BACKLIGHT_ENABLE | 52 | #ifdef BACKLIGHT_ENABLE |