mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 13:25:30 +03:00
Configurable I2C (rework)
This commit is contained in:
parent
a72f98e4f3
commit
52bfef1ea5
39 changed files with 1195 additions and 384 deletions
|
@ -54,6 +54,7 @@
|
|||
#include "drivers/rx_pwm.h"
|
||||
#include "drivers/pwm_output.h"
|
||||
#include "drivers/adc.h"
|
||||
#include "drivers/bus.h"
|
||||
#include "drivers/bus_i2c.h"
|
||||
#include "drivers/bus_spi.h"
|
||||
#include "drivers/buttons.h"
|
||||
|
@ -135,10 +136,6 @@
|
|||
void targetPreInit(void);
|
||||
#endif
|
||||
|
||||
#ifdef TARGET_BUS_INIT
|
||||
void targetBusInit(void);
|
||||
#endif
|
||||
|
||||
extern uint8_t motorControlEnable;
|
||||
|
||||
#ifdef SOFTSERIAL_LOOPBACK
|
||||
|
@ -367,6 +364,11 @@ void init(void)
|
|||
#endif /* USE_SPI */
|
||||
|
||||
#ifdef USE_I2C
|
||||
i2cHardwareConfigure();
|
||||
|
||||
// Note: Unlike UARTs which are configured when client is present,
|
||||
// I2C buses are initialized unconditionally if they are configured.
|
||||
|
||||
#ifdef USE_I2C_DEVICE_1
|
||||
i2cInit(I2CDEV_1);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue