boards/b-l475e-iot01a: configure second I2C
This I2C bus is used by on-board sensors
This commit is contained in:
parent
e19f6463c0
commit
61a9f791b6
@ -204,10 +204,22 @@ static const i2c_conf_t i2c_config[] = {
|
||||
.bus = APB1,
|
||||
.rcc_mask = RCC_APB1ENR1_I2C1EN,
|
||||
.irqn = I2C1_ER_IRQn,
|
||||
}
|
||||
},
|
||||
{
|
||||
.dev = I2C2,
|
||||
.speed = I2C_SPEED_NORMAL,
|
||||
.scl_pin = GPIO_PIN(PORT_B, 10),
|
||||
.sda_pin = GPIO_PIN(PORT_B, 11),
|
||||
.scl_af = GPIO_AF4,
|
||||
.sda_af = GPIO_AF4,
|
||||
.bus = APB1,
|
||||
.rcc_mask = RCC_APB1ENR1_I2C2EN,
|
||||
.irqn = I2C2_ER_IRQn,
|
||||
},
|
||||
};
|
||||
|
||||
#define I2C_0_ISR isr_i2c1_er
|
||||
#define I2C_1_ISR isr_i2c2_er
|
||||
|
||||
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
|
||||
/** @} */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user