1
0
Fork 0
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:
Dominic Clifton 2014-06-04 11:14:13 +01:00
parent b07a284f4e
commit 16528cf0d9
6 changed files with 29 additions and 18 deletions

View file

@ -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;