From 7013d0421f184ffc48207c3f0007cd88cbdc7811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Thu, 16 Mar 2017 04:18:17 +0100 Subject: [PATCH] Apparently, even the 7th generation prototype needs this code block to work for some reason. --- left/src/init_peripherials.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/left/src/init_peripherials.c b/left/src/init_peripherials.c index c3a87e0..a955e1b 100644 --- a/left/src/init_peripherials.c +++ b/left/src/init_peripherials.c @@ -22,11 +22,9 @@ void InitI2c() { PORT_SetPinConfig(I2C_BUS_SDA_PORT, I2C_BUS_SDA_PIN, &pinConfig); PORT_SetPinConfig(I2C_BUS_SCL_PORT, I2C_BUS_SCL_PIN, &pinConfig); -#if UHK_PCB_MAJOR_VERSION < 7 // The left keyboard half is an I2C slave, so calling I2C_MasterInit() doesn't make any sense. - // Yet, this is exactly what's required to make the left keyboard half of the 6th generation - // prototype send scancodes to the right half. Luckily, The 7th generation prototype works - // without this so, it will be removed as soon as the 6th generation prototypes get obsoleted. + // Yet, this is exactly what's required to make the left keyboard half prototype send scancodes + // to the right half. i2c_master_config_t masterConfig; I2C_MasterGetDefaultConfig(&masterConfig); @@ -34,7 +32,6 @@ void InitI2c() { masterConfig.baudRate_Bps = I2C_BUS_BAUD_RATE; sourceClock = CLOCK_GetFreq(I2C_BUS_CLK_SRC); I2C_MasterInit(I2C_BUS_BASEADDR, &masterConfig, sourceClock); -#endif } void InitLedDriver() {