1
0
Fork 0

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>
This commit is contained in:
Balz Guenat 2021-11-20 18:06:08 +01:00 committed by GitHub
parent d11d2459ce
commit 32215d5bff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 579 additions and 62 deletions

View file

@ -42,7 +42,11 @@ bool transport_execute_transaction(int8_t id, const void *initiator2target_buf,
#ifdef ENCODER_ENABLE
# include "encoder.h"
# define NUMBER_OF_ENCODERS (sizeof((pin_t[])ENCODERS_PAD_A) / sizeof(pin_t))
// if no pads for right half are defined, we assume the keyboard is symmetric (i.e. same pads)
# ifndef ENCODERS_PAD_A_RIGHT
# define ENCODERS_PAD_A_RIGHT ENCODERS_PAD_A
# endif
# define NUMBER_OF_ENCODERS ((sizeof((pin_t[])ENCODERS_PAD_A) + (sizeof((pin_t[])ENCODERS_PAD_A_RIGHT)) / sizeof(pin_t))
#endif // ENCODER_ENABLE
#ifdef BACKLIGHT_ENABLE