mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Move some clock initialisation code into the drivers.
This commit is contained in:
parent
b07a284f4e
commit
16528cf0d9
6 changed files with 29 additions and 18 deletions
|
@ -266,6 +266,8 @@ void i2cInit(I2C_TypeDef *I2C)
|
|||
I2C_InitTypeDef i2c;
|
||||
gpio_config_t gpio;
|
||||
|
||||
RCC_APB1PeriphClockCmd(RCC_APB1Periph_I2C2 | RCC_APB2Periph_GPIOB, ENABLE);
|
||||
|
||||
// Init pins
|
||||
gpio.pin = Pin_10 | Pin_11;
|
||||
gpio.speed = Speed_2MHz;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue