Changed FMPI2C specific to F410RB

pull/1412/head
Mika Laurila 2015-11-06 14:45:13 +02:00 committed by Wojciech Gorniak
parent 355e2ea0fb
commit 3e7a7ce046
1 changed files with 4 additions and 4 deletions

View File

@ -91,9 +91,9 @@ void i2c_init(i2c_t *obj, PinName sda, PinName scl)
}
#endif
#if (defined(FMPI2C1_BASE) && defined(FMPI2C1))
#if (defined(FMPI2C1_BASE) && defined(TARGET_NUCLEO_F410RB))
// Enable I2C3 clock and pinout if not done
if ((obj->i2c == FMPI2C1) && !fmpi2c1_inited) {
if ((obj->i2c == FMPI2C_1) && !fmpi2c1_inited) {
fmpi2c1_inited = 1;
__HAL_RCC_FMPI2C1_CLK_ENABLE();
// Configure I2C pins
@ -338,8 +338,8 @@ void i2c_reset(i2c_t *obj)
}
#endif
#if (defined(FMPI2C1_BASE) && defined(FMPI2C1))
if (obj->i2c == FMPI2C1) {
#if (defined(FMPI2C1_BASE) && defined(TARGET_NUCLEO_F410RB))
if (obj->i2c == FMPI2C_1) {
__HAL_RCC_FMPI2C1_FORCE_RESET();
__HAL_RCC_FMPI2C1_RELEASE_RESET();
}