Apparently, even the 7th generation prototype needs this code block to work for some reason.
This commit is contained in:
@@ -22,11 +22,9 @@ void InitI2c() {
|
|||||||
PORT_SetPinConfig(I2C_BUS_SDA_PORT, I2C_BUS_SDA_PIN, &pinConfig);
|
PORT_SetPinConfig(I2C_BUS_SDA_PORT, I2C_BUS_SDA_PIN, &pinConfig);
|
||||||
PORT_SetPinConfig(I2C_BUS_SCL_PORT, I2C_BUS_SCL_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.
|
// 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
|
// Yet, this is exactly what's required to make the left keyboard half prototype send scancodes
|
||||||
// prototype send scancodes to the right half. Luckily, The 7th generation prototype works
|
// to the right half.
|
||||||
// without this so, it will be removed as soon as the 6th generation prototypes get obsoleted.
|
|
||||||
|
|
||||||
i2c_master_config_t masterConfig;
|
i2c_master_config_t masterConfig;
|
||||||
I2C_MasterGetDefaultConfig(&masterConfig);
|
I2C_MasterGetDefaultConfig(&masterConfig);
|
||||||
@@ -34,7 +32,6 @@ void InitI2c() {
|
|||||||
masterConfig.baudRate_Bps = I2C_BUS_BAUD_RATE;
|
masterConfig.baudRate_Bps = I2C_BUS_BAUD_RATE;
|
||||||
sourceClock = CLOCK_GetFreq(I2C_BUS_CLK_SRC);
|
sourceClock = CLOCK_GetFreq(I2C_BUS_CLK_SRC);
|
||||||
I2C_MasterInit(I2C_BUS_BASEADDR, &masterConfig, sourceClock);
|
I2C_MasterInit(I2C_BUS_BASEADDR, &masterConfig, sourceClock);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitLedDriver() {
|
void InitLedDriver() {
|
||||||
|
|||||||
Reference in New Issue
Block a user