Skip to content

Commit

Permalink
Merge pull request #7939 from iNavFlight/dzikuvx-hglrcf722-bmi270
Browse files Browse the repository at this point in the history
Add BMI270 to HGLRCF722
  • Loading branch information
DzikuVx authored Mar 30, 2022
2 parents e34619e + 9f7f8c3 commit 9c3d413
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/target/HGLRCF722/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "drivers/sensor.h"

BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000, DEVHW_MPU6000, MPU6000_SPI_BUS, MPU6000_CS_PIN, MPU6000_EXTI_PIN, 0, DEVFLAGS_NONE, IMU_MPU6000_ALIGN);
BUSDEV_REGISTER_SPI_TAG(busdev_bmi270, DEVHW_BMI270, BMI270_SPI_BUS, BMI270_CS_PIN, BMI270_EXTI_PIN, 0, DEVFLAGS_NONE, IMU_BMI270_ALIGN);

const timerHardware_t timerHardware[] = {
DEF_TIM(TIM3, CH1, PB4, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S1 UP1-2 D(1, 4, 5)
Expand Down
6 changes: 6 additions & 0 deletions src/main/target/HGLRCF722/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
#define MPU6000_SPI_BUS BUS_SPI1
#define MPU6000_EXTI_PIN PC4

#define USE_IMU_BMI270
#define IMU_BMI270_ALIGN CW180_DEG_FLIP
#define BMI270_SPI_BUS BUS_SPI1
#define BMI270_CS_PIN PB2
#define BMI270_EXTI_PIN PC4

#define USE_EXTI
#define USE_MPU_DATA_READY_SIGNAL

Expand Down

0 comments on commit 9c3d413

Please sign in to comment.