mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
updated I2C driver to allow using I2C2 or I2C1 at compile time - call i2cInit with I2CDEV_1 or _2.
Applied same to SOFT_I2C driver (but the pin config is compile-time #define) Conflicts: src/board.h src/drv_i2c.h src/drv_system.c src/main/drivers/bus_i2c_soft.c src/main/drivers/bus_i2c_stm32f10x.c
This commit is contained in:
parent
0ac2b51c60
commit
b3a718882c
8 changed files with 113 additions and 47 deletions
|
@ -160,7 +160,7 @@ void i2cInitPort(I2C_TypeDef *I2Cx)
|
|||
}
|
||||
}
|
||||
|
||||
void i2cInit(I2C_TypeDef *I2C)
|
||||
void i2cInit(I2CDevice index)
|
||||
{
|
||||
i2cInitPort(I2C1); // hard coded to use I2C1 for now
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue