1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

Add MPU9150 driver.

This is a almost a complete clone of the 6050 - needs cleanup and
de-duplication.
This commit is contained in:
Dominic Clifton 2014-12-09 03:01:39 +00:00
parent e43348598a
commit fed6df275f
7 changed files with 411 additions and 5 deletions

View file

@ -32,6 +32,7 @@
#include "drivers/accgyro_mma845x.h"
#include "drivers/accgyro_mpu3050.h"
#include "drivers/accgyro_mpu6050.h"
#include "drivers/accgyro_mpu9150.h"
#include "drivers/accgyro_l3gd20.h"
#include "drivers/accgyro_lsm303dlhc.h"
@ -139,6 +140,12 @@ bool detectGyro(uint16_t gyroLpf)
}
#endif
#ifdef USE_GYRO_MPU9150
if (mpu9150GyroDetect(NULL, &gyro, gyroLpf)) {
return true;
}
#endif
#ifdef USE_GYRO_L3G4200D
if (l3g4200dDetect(&gyro, gyroLpf)) {
#ifdef NAZE
@ -245,6 +252,15 @@ retry:
}
; // fallthrough
#endif
#ifdef USE_ACC_MPU9150
case ACC_MPU9150: // MPU9150
if (mpu9150AccDetect(NULL, &acc)) {
accHardware = ACC_MPU9150;
if (accHardwareToUse == ACC_MPU9150)
break;
}
; // fallthrough
#endif
#ifdef USE_ACC_MMA8452
case ACC_MMA8452: // MMA8452
#ifdef NAZE