From f6c7e114260890292dcd12645db7fecd64167973 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 16 Jul 2019 01:40:54 -0700 Subject: Remove the need to specify NUM_OF_ENCODERS for the Encoder feature (#6328) * Remove the need to set NUM_OF_ENCODERS Instead, calculate the size of the array, and use that instead * Add hack for split common support * Remove NUM_OF_ENCODERS from keyboard config Can be reverted, if needed --- quantum/split_common/transport.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'quantum/split_common') diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index b32d48eb88..ba21d0c7b1 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c @@ -17,6 +17,8 @@ #ifdef ENCODER_ENABLE # include "encoder.h" +static pin_t encoders_pad[] = ENCODERS_PAD_A; +# define NUMBER_OF_ENCODERS (sizeof(encoders_pad)/sizeof(pin_t)) #endif #if defined(USE_I2C) || defined(EH) -- cgit v1.2.3