mirror of https://github.com/ARMmbed/mbed-os.git
Removed F410RB specific ifdef from i2c_api.c and added FMPI2C_1 to F446RE PeripheralNames.h to make it compile
parent
b343fb7e43
commit
efbcd5171e
|
@ -67,7 +67,8 @@ typedef enum {
|
|||
typedef enum {
|
||||
I2C_1 = (int)I2C1_BASE,
|
||||
I2C_2 = (int)I2C2_BASE,
|
||||
I2C_3 = (int)I2C3_BASE
|
||||
I2C_3 = (int)I2C3_BASE,
|
||||
FMPI2C_1 = (int)FMPI2C1_BASE
|
||||
} I2CName;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -91,7 +91,7 @@ void i2c_init(i2c_t *obj, PinName sda, PinName scl)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if (defined(FMPI2C1_BASE) && defined(TARGET_NUCLEO_F410RB))
|
||||
#if defined FMPI2C1_BASE
|
||||
// Enable I2C3 clock and pinout if not done
|
||||
if ((obj->i2c == FMPI2C_1) && !fmpi2c1_inited) {
|
||||
fmpi2c1_inited = 1;
|
||||
|
@ -338,7 +338,7 @@ void i2c_reset(i2c_t *obj)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if (defined(FMPI2C1_BASE) && defined(TARGET_NUCLEO_F410RB))
|
||||
#if defined FMPI2C1_BASE
|
||||
if (obj->i2c == FMPI2C_1) {
|
||||
__HAL_RCC_FMPI2C1_FORCE_RESET();
|
||||
__HAL_RCC_FMPI2C1_RELEASE_RESET();
|
||||
|
|
Loading…
Reference in New Issue