Browse Source

Fix for I2C overclock not used. Closes #609 (#610)

master
Konstantin Sharlaimov 8 years ago
committed by GitHub
parent
commit
9030f1b2bf
  1. 6
      src/main/drivers/bus_i2c_stm32f10x.c
  2. 6
      src/main/drivers/bus_i2c_stm32f30x.c

6
src/main/drivers/bus_i2c_stm32f10x.c

@ -99,11 +99,11 @@ static i2cState_t i2cState[] = {
{ false, false, false, 0, 0, 0, 0, 0, 0, 0 }
};
static bool i2cOverClock;
void i2cSetOverclock(uint8_t overClock)
{
i2cOverClock = overClock ? true : false;
for (unsigned int i = 0; i < sizeof(i2cHardwareMap) / sizeof(i2cHardwareMap[0]); i++) {
i2cHardwareMap[i].overClock = overClock;
}
}
void I2C1_ER_IRQHandler(void) {

6
src/main/drivers/bus_i2c_stm32f30x.c

@ -70,11 +70,11 @@ static bool deviceInitialised[] = {
false
};
static bool i2cOverClock;
void i2cSetOverclock(uint8_t overClock)
{
i2cOverClock = overClock ? true : false;
for (unsigned i = 0; i < sizeof(i2cHardwareMap) / sizeof(i2cHardwareMap[0]); i++) {
i2cHardwareMap[i].overClock = overClock;
}
}
///////////////////////////////////////////////////////////////////////////////

Loading…
Cancel
Save