mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 04:45:24 +03:00
Ported some I2C code from AQ32PlusF3 which itself looked ported from the
STM32 examples.
This commit is contained in:
parent
8d9ce86a5a
commit
4febeb3969
12 changed files with 883 additions and 20 deletions
|
@ -16,6 +16,9 @@
|
|||
#include "drivers/accgyro_mma845x.h"
|
||||
#include "drivers/accgyro_mpu3050.h"
|
||||
#include "drivers/accgyro_mpu6050.h"
|
||||
#ifdef STM32F3DISCOVERY
|
||||
#include "drivers/accgyro_lsm303dlhc.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "drivers/barometer_common.h"
|
||||
|
@ -146,13 +149,20 @@ retry:
|
|||
}
|
||||
#endif
|
||||
#ifdef STM32F3DISCOVERY
|
||||
default:
|
||||
if (fakeAccDetect(&acc)) {
|
||||
accHardware = ACC_BMA280;
|
||||
accAlign = CW0_DEG; //
|
||||
if (accHardwareToUse == ACC_FAKE)
|
||||
case ACC_LSM303DLHC:
|
||||
if (lsm303dlhcAccDetect(&acc)) {
|
||||
accHardware = ACC_LSM303DLHC;
|
||||
accAlign = ALIGN_DEFAULT; //
|
||||
if (accHardwareToUse == ACC_LSM303DLHC)
|
||||
break;
|
||||
}
|
||||
// default:
|
||||
// if (fakeAccDetect(&acc)) {
|
||||
// accHardware = ACC_FAKE;
|
||||
// accAlign = CW0_DEG; //
|
||||
// if (accHardwareToUse == ACC_FAKE)
|
||||
// break;
|
||||
// }
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue