Added BMI160 to STM32F3DISCOVERY (#3971)
This commit is contained in:
parent
ef00cc45cf
commit
098f9eec60
|
@ -37,6 +37,8 @@
|
|||
|
||||
#include "platform.h"
|
||||
|
||||
#ifdef USE_ACCGYRO_BMI160
|
||||
|
||||
#include "drivers/bus_spi.h"
|
||||
#include "drivers/exti.h"
|
||||
#include "drivers/io.h"
|
||||
|
@ -48,8 +50,6 @@
|
|||
#include "accgyro_spi_bmi160.h"
|
||||
|
||||
|
||||
#ifdef USE_ACCGYRO_BMI160
|
||||
|
||||
/* BMI160 Registers */
|
||||
#define BMI160_REG_CHIPID 0x00
|
||||
#define BMI160_REG_PMU_STAT 0x03
|
||||
|
|
|
@ -94,6 +94,16 @@
|
|||
#define USE_GYRO_SPI_MPU9250
|
||||
#define MPU9250_CS_PIN SPI2_NSS_PIN
|
||||
#define MPU9250_SPI_INSTANCE SPI2
|
||||
// BMI160 gyro support
|
||||
//#define USE_ACCGYRO_BMI160
|
||||
#ifdef USE_ACCGYRO_BMI160
|
||||
#define BMI160_CS_PIN SPI2_NSS_PIN
|
||||
#define BMI160_SPI_INSTANCE SPI2
|
||||
#define BMI160_SPI_DIVISOR 16
|
||||
#define BMI160_INT_EXTI PC13
|
||||
#define USE_MPU_DATA_READY_SIGNAL
|
||||
#define USE_EXTI
|
||||
#endif
|
||||
|
||||
#define ACC
|
||||
#define USE_FAKE_ACC
|
||||
|
|
|
@ -15,6 +15,7 @@ TARGET_SRC = \
|
|||
drivers/accgyro/accgyro_mpu3050.c \
|
||||
drivers/accgyro/accgyro_mpu6050.c \
|
||||
drivers/accgyro/accgyro_mpu6500.c \
|
||||
drivers/accgyro/accgyro_spi_bmi160.c \
|
||||
drivers/accgyro/accgyro_spi_mpu6000.c \
|
||||
drivers/accgyro/accgyro_spi_mpu6500.c \
|
||||
drivers/accgyro/accgyro_spi_mpu9250.c \
|
||||
|
|
Loading…
Reference in New Issue