The I2C watchdog of the right keyboard half was buggy, but not now that it's fixed, I2C_MasterInit() is not required anymore.

This commit is contained in:
László Monda
2017-03-16 14:13:09 +01:00
parent 888eea2dd6
commit f3c814a68e

View File

@@ -21,17 +21,6 @@ void InitI2c() {
pinConfig.mux = I2C_BUS_MUX;
PORT_SetPinConfig(I2C_BUS_SDA_PORT, I2C_BUS_SDA_PIN, &pinConfig);
PORT_SetPinConfig(I2C_BUS_SCL_PORT, I2C_BUS_SCL_PIN, &pinConfig);
// 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 prototype send scancodes
// to the right half.
i2c_master_config_t masterConfig;
I2C_MasterGetDefaultConfig(&masterConfig);
uint32_t sourceClock;
masterConfig.baudRate_Bps = I2C_BUS_BAUD_RATE;
sourceClock = CLOCK_GetFreq(I2C_BUS_CLK_SRC);
I2C_MasterInit(I2C_BUS_BASEADDR, &masterConfig, sourceClock);
}
void InitLedDriver() {