mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Configurable baro (BMP280)
- busDevice_t is now has a discriminator. - busDevice_t is added to baroDev_t. - BMP280 I2C and SPI drivers are consolidated.
This commit is contained in:
parent
b3898fa9d1
commit
52d447d2ef
14 changed files with 152 additions and 209 deletions
|
@ -316,7 +316,7 @@ static bool gyroInitSensor(gyroSensor_t *gyroSensor)
|
|||
// set cnsPin using GYRO_n_CS_PIN defined in target.h
|
||||
gyroSensor->gyroDev.bus.spi.csnPin = gyroConfig()->gyro_to_use == 0 ? IOGetByTag(IO_TAG(GYRO_0_CS_PIN)) : IOGetByTag(IO_TAG(GYRO_1_CS_PIN));
|
||||
#else
|
||||
gyroSensor->gyroDev.bus.spi.csnPin = IO_NONE; // set cnsPin to IO_NONE so mpuDetect will set it according to value defined in target.h
|
||||
gyroSensor->gyroDev.bus.busdev_u.spi.csnPin = IO_NONE; // set cnsPin to IO_NONE so mpuDetect will set it according to value defined in target.h
|
||||
#endif // USE_DUAL_GYRO
|
||||
mpuDetect(&gyroSensor->gyroDev);
|
||||
mpuResetFn = gyroSensor->gyroDev.mpuConfiguration.resetFn; // must be set after mpuDetect
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue