X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=quantum%2Fsplit_common%2Ftransport.c;h=ba21d0c7b1db9adea17da1276f4d1d2c4daa3e55;hb=f6c7e114260890292dcd12645db7fecd64167973;hp=a3539576f5103046230dd810080a28047fc7b37f;hpb=12e6d412023b23c64980d30704ae11892e33c512;p=qmk_firmware.git diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index a3539576f..ba21d0c7b 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) @@ -74,7 +76,7 @@ bool transport_master(matrix_row_t matrix[]) { # endif # ifdef ENCODER_ENABLE - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(I2C_slave_buffer_t.encoder_state), TIMEOUT); + i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT); encoder_update_raw(i2c_buffer->encoder_state); # endif