Skip to content

Commit

Permalink
[target] ALIENFLIGHTF4 add MPU9250, update id (#1006)
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdCopter authored Apr 16, 2024
1 parent bfebfc6 commit 02bdcea
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/main/target/ALIENFLIGHTF4/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@
*/

#pragma once
#define TARGET_BOARD_IDENTIFIER "AFF4"

#define USE_TARGET_CONFIG

#define BOARD_NAME ALIENFLIGHTF4
#define MANUFACTURER_ID AFNG
#define TARGET_BOARD_IDENTIFIER "S405" // generic ID
#define FC_TARGET_MCU STM32F405 // not used in EmuF

#define USE_HARDWARE_REVISION_DETECTION
#define HW_PIN PC13

#define USBD_PRODUCT_STRING "AlienFlight F4"

#define LED0_PIN PC12
#define LED1_PIN PD2

Expand All @@ -43,16 +46,22 @@
#define USE_MPU_DATA_READY_SIGNAL
#define ENSURE_MPU_DATA_READY_IS_LOW

#define MPU6500_CS_PIN SPI1_NSS_PIN
#define MPU6500_SPI_INSTANCE SPI1

#define USE_ACC
#define USE_ACC_SPI_MPU6500
#define ACC_MPU6500_ALIGN CW270_DEG

#define USE_GYRO
#define USE_ACC_SPI_MPU6500
#define USE_GYRO_SPI_MPU6500
#define USE_GYRO_SPI_MPU9250
#define USE_ACC_SPI_MPU9250

#define ACC_MPU6500_ALIGN CW270_DEG
#define GYRO_MPU6500_ALIGN CW270_DEG
#define MPU6500_CS_PIN SPI1_NSS_PIN
#define MPU6500_SPI_INSTANCE SPI1

#define ACC_MPU9250_ALIGN CW270_DEG
#define GYRO_MPU9250_ALIGN CW270_DEG
#define MPU9250_CS_PIN PA4
#define MPU9250_SPI_INSTANCE SPI1

#define USE_MAG
#define USE_MAG_HMC5883
Expand Down
2 changes: 2 additions & 0 deletions src/main/target/ALIENFLIGHTF4/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ F405_TARGETS += $(TARGET)
FEATURES += SDCARD VCP ONBOARDFLASH

TARGET_SRC = \
drivers/accgyro/accgyro_mpu.c \
drivers/accgyro/accgyro_mpu6500.c \
drivers/accgyro/accgyro_spi_mpu6500.c \
drivers/accgyro/accgyro_spi_mpu9250.c \
drivers/barometer/barometer_bmp280.c \
drivers/barometer/barometer_ms5611.c \
drivers/compass/compass_ak8963.c \
Expand Down

0 comments on commit 02bdcea

Please sign in to comment.