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

Merge pull request #8097 from blckmn/VIVAF4AIO

VIVAF4AIO
This commit is contained in:
J Blackman 2019-04-27 13:10:24 +10:00 committed by mikeller
parent ede066fbee
commit 1cc1ae50e5
5 changed files with 199 additions and 11 deletions

View file

@ -0,0 +1 @@
# VIVAF4AIO has motors 7 and 8 defined.

View file

@ -37,8 +37,10 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // S5 (2,4) (2.2)
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // S6 (1,2)
#if !defined(VIVAF4AIO)
DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 0), // S7 (1,5)
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // S8 (2,7)
#endif
DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // LED STRIP(1,0)

View file

@ -20,8 +20,13 @@
#pragma once
#define TARGET_BOARD_IDENTIFIER "DLF4"
#define USBD_PRODUCT_STRING "DALRCF405"
#if defined(VIVAF4AIO)
# define TARGET_BOARD_IDENTIFIER "VIVA"
# define USBD_PRODUCT_STRING "VIVAF405AIO"
#else
# define TARGET_BOARD_IDENTIFIER "DLF4"
# define USBD_PRODUCT_STRING "DALRCF405"
#endif
//----------------------------------------
//LED & BEE-------------------------------
@ -48,12 +53,18 @@
#define USE_ACC
#define GYRO_1_CS_PIN PA4
#define GYRO_1_SPI_INSTANCE SPI1
#define GYRO_1_ALIGN CW90_DEG
#define ACC_1_ALIGN CW90_DEG
#if defined(VIVAF4AIO)
//------ICM20602
# define USE_GYRO_SPI_ICM20602
# define USE_ACC_SPI_ICM20602
# define GYRO_1_ALIGN CW0_DEG
#else
//------ICM20689
#define USE_GYRO_SPI_ICM20689
#define USE_ACC_SPI_ICM20689
# define USE_GYRO_SPI_ICM20689
# define USE_ACC_SPI_ICM20689
# define GYRO_1_ALIGN CW90_DEG
#endif
//------MPU6000
#define USE_GYRO_SPI_MPU6000
@ -151,9 +162,9 @@
#define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD (BIT(2))
#define USABLE_TIMER_CHANNEL_COUNT 11
#if defined(VIVAF4AIO)
# define USABLE_TIMER_CHANNEL_COUNT 9
#else
# define USABLE_TIMER_CHANNEL_COUNT 11
#endif
#define USED_TIMERS (TIM_N(1)|TIM_N(2)|TIM_N(3)|TIM_N(4)|TIM_N(8)|TIM_N(12))