Skip to content

Commit

Permalink
[target] ALIENWHOOP fix compile warning and refresh; add ADC; add MPU…
Browse files Browse the repository at this point in the history
…9250 (#987)
  • Loading branch information
nerdCopter authored Mar 6, 2024
1 parent 83dd269 commit 4e7adab
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
24 changes: 20 additions & 4 deletions src/main/target/ALIENWHOOP/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@

/* Multi-Arch Support for 168MHz or 216MHz ARM Cortex processors - STM32F405RGT or STM32F7RET
*/

#define TARGET_MANUFACTURER_IDENTIFIER "ALWH"

#if defined(ALIENWHOOPF4)
#define TARGET_BOARD_IDENTIFIER "AWF4"
#define USBD_PRODUCT_STRING "AlienWhoopF4"
#define USBD_PRODUCT_STRING "ALIENWHOOPF4"
#define FC_TARGET_MCU STM32F405 // not used in EmuF
#define TARGET_BOARD_IDENTIFIER "S405" // generic ID
#else
#define TARGET_BOARD_IDENTIFIER "AWF7"
#define USBD_PRODUCT_STRING "AlienWhoopF7"
#define USBD_PRODUCT_STRING "ALIENWHOOPF7"
#define FC_TARGET_MCU STM32F7X2 // not used in EmuF
#define TARGET_BOARD_IDENTIFIER "S7X2"
#endif

#define USE_TARGET_CONFIG // see config.c for target specific customizations
Expand Down Expand Up @@ -125,6 +130,9 @@
// MPU
#define MPU6500_CS_PIN SPI1_NSS_PIN
#define MPU6500_SPI_INSTANCE SPI1
#define MPU9250_CS_PIN SPI1_NSS_PIN
#define MPU9250_SPI_INSTANCE SPI1

#define USE_MPU_DATA_READY_SIGNAL
#define ENSURE_MPU_DATA_READY_IS_LOW
// MAG
Expand All @@ -136,11 +144,15 @@
// GYRO
#define USE_GYRO
#define USE_GYRO_SPI_MPU6500
#define USE_GYRO_SPI_MPU9250
#define GYRO_MPU6500_ALIGN CW0_DEG
#define GYRO_MPU9250_ALIGN CW0_DEG
// ACC
#define USE_ACC
#define USE_ACC_SPI_MPU6500
#define USE_ACC_SPI_MPU9250
#define ACC_MPU6500_ALIGN CW0_DEG
#define ACC_MPU9250_ALIGN CW0_DEG

/* Optional Digital Pressure Sensor (barometer) - Bosch BMP280
* TODO: not implemented on V1 or V2 pcb
Expand Down Expand Up @@ -232,6 +244,10 @@
#define TARGET_IO_PORTE 0xffff
#endif

#define USE_ADC
#define ADC1_DMA_OPT 1
#define ADC1_DMA_STREAM DMA2_Stream4 //# ADC 1: DMA2 Stream 4 Channel 0

/* Timers
*/
#define USABLE_TIMER_CHANNEL_COUNT 5
Expand Down
1 change: 1 addition & 0 deletions src/main/target/ALIENWHOOP/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ FEATURES += ONBOARDFLASH VCP
TARGET_SRC = \
drivers/accgyro/accgyro_mpu6500.c \
drivers/accgyro/accgyro_spi_mpu6500.c \
drivers/accgyro/accgyro_spi_mpu9250.c \
drivers/barometer/barometer_bmp280.c \
drivers/compass/compass_ak8963.c \
drivers/flash_m25p16.c \
Expand Down

0 comments on commit 4e7adab

Please sign in to comment.