commit
497ede203f
|
@ -0,0 +1 @@
|
|||
#OMNIBUSF4V6
|
|
@ -32,8 +32,12 @@
|
|||
#include "config_helper.h"
|
||||
|
||||
static targetSerialPortFunction_t targetSerialPortFunction[] = {
|
||||
#ifdef OMNIBUSF4V6
|
||||
{ SERIAL_PORT_USART6, FUNCTION_RX_SERIAL },
|
||||
#else
|
||||
{ SERIAL_PORT_USART1, FUNCTION_RX_SERIAL },
|
||||
{ SERIAL_PORT_UART4, FUNCTION_ESC_SENSOR },
|
||||
#endif
|
||||
};
|
||||
|
||||
void targetConfiguration(void)
|
||||
|
|
|
@ -32,22 +32,29 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
|||
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // D(1,7) U(1,2)
|
||||
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // D(1,2) U(1,2)
|
||||
DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // D(1,6) U(1,7)
|
||||
#if defined(OMNIBUSF4FW)
|
||||
DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // D(1,5) U(1,2)
|
||||
#elif defined(OMNIBUSF4FW1)
|
||||
#if defined(OMNIBUSF4FW1)
|
||||
DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, 0, 0),
|
||||
#else
|
||||
DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // D(1,5) U(1,2)
|
||||
#endif
|
||||
|
||||
// Additional motors/servos
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_NONE, 0, 0), // SJ1/M5
|
||||
DEF_TIM(TIM8, CH4, PC9, TIM_USE_NONE, 0, 0), // SJ2/M6
|
||||
|
||||
// Other functions
|
||||
DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // D(1,0)
|
||||
DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // PPM
|
||||
DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // PPM Collision with I2C2_SCL
|
||||
|
||||
#if defined(OMNIBUSF4V6)
|
||||
DEF_TIM(TIM11, CH1, PB7, TIM_USE_CAMERA_CONTROL, 0, 0), // CAM_CTL,timer collision with I2C1_SDA
|
||||
#else
|
||||
DEF_TIM(TIM11, CH1, PB9, TIM_USE_CAMERA_CONTROL, 0, 0), // CAM_CTL
|
||||
#endif
|
||||
|
||||
// Spare pins and backdoor timer
|
||||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_NONE, 0, 0), // UART6_TX
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_NONE, 0, 0), // UART6_RX
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_NONE, 0, 0), // SJ1
|
||||
DEF_TIM(TIM8, CH4, PC9, TIM_USE_NONE, 0, 0), // SJ2
|
||||
|
||||
// Backdoor timers on UARTs
|
||||
DEF_TIM(TIM1, CH2, PA9, TIM_USE_NONE, 0, 0), // UART1_TX
|
||||
|
|
|
@ -25,19 +25,28 @@
|
|||
// OMNIBUSF4FW for Version 2
|
||||
// OMNIBUSF4FW1/OFW1 for Public Test Version
|
||||
// (Not a valid target, .mk file must be supplied by a user)
|
||||
// OMNIBUSF4V6
|
||||
|
||||
#if defined(OMNIBUSF4FW)
|
||||
#define TARGET_BOARD_IDENTIFIER "OBFW"
|
||||
#define USBD_PRODUCT_STRING "OmnibusF4 Fireworks"
|
||||
#if defined(OMNIBUSF4V6)
|
||||
#define TARGET_BOARD_IDENTIFIER "OBV6"
|
||||
#elif defined(OMNIBUSF4FW1)
|
||||
#define TARGET_BOARD_IDENTIFIER "OFW1"
|
||||
#define USBD_PRODUCT_STRING "OmnibusF4 FWProto1"
|
||||
#else
|
||||
#define TARGET_BOARD_IDENTIFIER "OBFW"
|
||||
#endif
|
||||
|
||||
#if defined(OMNIBUSF4FW)
|
||||
#define LED0_PIN PA8
|
||||
#elif defined(OMNIBUSF4FW1)
|
||||
#if defined(OMNIBUSF4FW1)
|
||||
#define USBD_PRODUCT_STRING "OmnibusF4 FWProto1"
|
||||
#elif defined(OMNIBUSF4V6)
|
||||
#define USBD_PRODUCT_STRING "OmnibusF4 V6"
|
||||
#else
|
||||
#define USBD_PRODUCT_STRING "OmnibusF4 Fireworks"
|
||||
#endif
|
||||
|
||||
#if defined(OMNIBUSF4FW1)
|
||||
#define LED0_PIN PB5
|
||||
#else
|
||||
#define LED0_PIN PA8
|
||||
#endif
|
||||
|
||||
#define USE_BEEPER
|
||||
|
@ -54,15 +63,28 @@
|
|||
|
||||
#define USE_DUAL_GYRO
|
||||
|
||||
#if defined(OMNIBUSF4V6)
|
||||
#define GYRO_1_CS_PIN PA4 // Onboard IMU
|
||||
#define GYRO_1_SPI_INSTANCE SPI1
|
||||
#define GYRO_2_CS_PIN PC14 // External IMU
|
||||
#define GYRO_2_SPI_INSTANCE SPI1
|
||||
#else
|
||||
#define GYRO_1_CS_PIN PD2
|
||||
#define GYRO_1_SPI_INSTANCE SPI3
|
||||
#define GYRO_2_CS_PIN PA4
|
||||
#define GYRO_2_SPI_INSTANCE SPI1
|
||||
#endif
|
||||
|
||||
#define GYRO_1_ALIGN CW180_DEG
|
||||
#define ACC_1_ALIGN CW180_DEG
|
||||
|
||||
#if defined(OMNIBUSF4V6)
|
||||
#define GYRO_2_ALIGN CW180_DEG
|
||||
#define ACC_2_ALIGN CW180_DEG
|
||||
#else
|
||||
#define GYRO_2_ALIGN CW0_DEG_FLIP
|
||||
#define ACC_2_ALIGN CW0_DEG_FLIP
|
||||
#endif
|
||||
|
||||
#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_1
|
||||
|
||||
|
@ -74,11 +96,13 @@
|
|||
#define USE_MPU_DATA_READY_SIGNAL
|
||||
|
||||
#define USE_MAG
|
||||
#define MAG_I2C_INSTANCE (I2CDEV_1)
|
||||
#define USE_MAG_HMC5883
|
||||
#define USE_MAG_LIS3MDL
|
||||
#define MAG_HMC5883_ALIGN CW90_DEG
|
||||
|
||||
#define USE_BARO
|
||||
#define BARO_I2C_INSTANCE (I2CDEV_1)
|
||||
#define USE_BARO_SPI_BMP280
|
||||
#define BARO_SPI_INSTANCE SPI3
|
||||
#define BARO_CS_PIN PB3
|
||||
|
@ -147,11 +171,19 @@
|
|||
#define SPI3_MISO_PIN PC11
|
||||
#define SPI3_MOSI_PIN PC12
|
||||
|
||||
#if defined(OMNIBUSF4V6)
|
||||
#define USE_I2C
|
||||
#define USE_I2C_DEVICE_1
|
||||
#define I2C1_SCL PB8 // SCL PIN,alt MST8
|
||||
#define I2C1_SDA PB9 // SDA PIN,alt MST7
|
||||
#define I2C_DEVICE (I2CDEV_1)
|
||||
#else
|
||||
#define USE_I2C
|
||||
#define USE_I2C_DEVICE_2
|
||||
#define I2C2_SCL NONE // PB10, shared with UART3TX
|
||||
#define I2C2_SDA NONE // PB11, shared with UART3RX
|
||||
#define I2C_DEVICE (I2CDEV_2)
|
||||
#endif
|
||||
|
||||
#define USE_ADC
|
||||
#define ADC_INSTANCE ADC2
|
||||
|
@ -181,9 +213,6 @@
|
|||
#define TARGET_IO_PORTC (0xffff & ~(BIT(15)))
|
||||
#define TARGET_IO_PORTD BIT(2)
|
||||
|
||||
#if defined(OMNIBUSF4FW) || defined(OMNIBUSF4FW1)
|
||||
#define USABLE_TIMER_CHANNEL_COUNT 15
|
||||
#else
|
||||
#define USABLE_TIMER_CHANNEL_COUNT 14
|
||||
#endif
|
||||
|
||||
#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) | TIM_N(10) | TIM_N(11))
|
||||
|
|
Loading…
Reference in New Issue