[stm32] fix i2c_reset

rcc_periph_reset_pulse needs RST_I2Cx instead of RCC_I2Cx as argument
see also #329
This commit is contained in:
Felix Ruess
2014-06-26 00:05:43 +02:00
parent c01f9ee323
commit f49c1f264a

View File

@@ -53,16 +53,16 @@ void i2c_reset(uint32_t i2c)
{ {
switch (i2c) { switch (i2c) {
case I2C1: case I2C1:
rcc_periph_reset_pulse(RCC_I2C1); rcc_periph_reset_pulse(RST_I2C1);
break; break;
#if defined(I2C2_BASE) #if defined(I2C2_BASE)
case I2C2: case I2C2:
rcc_periph_reset_pulse(RCC_I2C2); rcc_periph_reset_pulse(RST_I2C2);
break; break;
#endif #endif
#if defined(I2C3_BASE) #if defined(I2C3_BASE)
case I2C3: case I2C3:
rcc_periph_reset_pulse(RCC_I2C3); rcc_periph_reset_pulse(RST_I2C3);
break; break;
#endif #endif
default: default: