mirror of https://github.com/ARMmbed/mbed-os.git
Changed FMPI2C specific to F410RB
parent
355e2ea0fb
commit
3e7a7ce046
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue