2 * This file is part of INAV.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
6 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * Alternatively, the contents of this file may be used under the terms
9 * of the GNU General Public License Version 3, as described below:
11 * This file is free software: you may copy, redistribute and/or modify
12 * it under the terms of the GNU General Public License as published by the
13 * Free Software Foundation, either version 3 of the License, or (at your
14 * option) any later version.
16 * This file is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
19 * Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see http://www.gnu.org/licenses/.
27 #if defined(OMNIBUSF4V6)
28 #define TARGET_BOARD_IDENTIFIER "OBV6"
30 #define TARGET_BOARD_IDENTIFIER "FWX2"
33 #if defined(OMNIBUSF4V6)
34 #define USBD_PRODUCT_STRING "OmnibusF4 V6"
36 #define USBD_PRODUCT_STRING "OMNIBUS F4 FWX V2"
40 #define USE_ESC_SENSOR
47 #define BEEPER_INVERTED
51 #if defined(OMNIBUSF4V6)
52 #define USE_I2C_DEVICE_1
53 #define I2C1_SCL PB8 // SCL PIN,alt MST8
54 #define I2C1_SDA PB9 // SDA PIN,alt MST7
55 #define DEFAULT_I2C_BUS BUS_I2C1
57 #define USE_I2C_DEVICE_2
58 #define I2C_DEVICE_2_SHARES_UART3
62 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS // Don't use common busdev descriptors for IMU
63 #define USE_IMU_MPU6500
64 #define USE_IMU_MPU6000
66 #if defined(OMNIBUSF4V6)
67 # define IMU_1_CS_PIN PA4
68 # define IMU_1_SPI_BUS BUS_SPI1
69 # define IMU_1_ALIGN CW180_DEG
70 # define IMU_2_CS_PIN PC14
71 # define IMU_2_SPI_BUS BUS_SPI1
72 # define IMU_2_ALIGN CW0_DEG
74 // IMU_1 is verified to work on OBF4V6 and Omnibus Fireworks board
75 # define IMU_1_CS_PIN PA4
76 # define IMU_1_SPI_BUS BUS_SPI1
77 # define IMU_1_ALIGN CW0_DEG_FLIP
78 // IMU_2 is sketchy and was not verified on actual hardware
79 # define IMU_2_CS_PIN PD2
80 # define IMU_2_SPI_BUS BUS_SPI3
81 # define IMU_2_ALIGN CW180_DEG
85 #if defined(OMNIBUSF4V6)
86 #define MAG_I2C_BUS BUS_I2C1
88 #define MAG_I2C_BUS BUS_I2C2
92 #if defined(OMNIBUSF4V6)
93 #define TEMPERATURE_I2C_BUS BUS_I2C1
95 #define TEMPERATURE_I2C_BUS BUS_I2C2
99 #define USE_BARO_BMP280
100 #define BMP280_SPI_BUS BUS_SPI3
101 #define BMP280_CS_PIN PB3
102 #if defined(OMNIBUSF4V6)
103 #define BARO_I2C_BUS BUS_I2C1
106 #if defined(OMNIBUSF4V6)
107 #define PITOT_I2C_BUS BUS_I2C1
109 #define PITOT_I2C_BUS BUS_I2C2
112 #define USE_RANGEFINDER
113 #if defined(OMNIBUSF4V6)
114 #define RANGEFINDER_I2C_BUS BUS_I2C1
116 #define RANGEFINDER_I2C_BUS BUS_I2C2
120 #define VBUS_SENSING_PIN PC5
121 #define VBUS_SENSING_ENABLED
124 #define UART1_RX_PIN PA10
125 #define UART1_TX_PIN PA9
128 #define UART2_RX_PIN NONE
129 #define UART2_TX_PIN PA2
132 #define UART3_RX_PIN PB11
133 #define UART3_TX_PIN PB10
136 #define UART4_RX_PIN PA1
137 #define UART4_TX_PIN NONE
140 #define UART6_RX_PIN PC7
141 #define UART6_TX_PIN PC6
143 #define USE_SOFTSERIAL1
144 #define SOFTSERIAL_1_RX_PIN NONE
145 #define SOFTSERIAL_1_TX_PIN PA9 // Clash with UART1_TX, needed for S.Port
147 #define SERIAL_PORT_COUNT 7 // VCP, USART1, USART2, USART3, USART4, USART6, SOFTSERIAL1
151 #define USE_SPI_DEVICE_1
152 #define SPI1_NSS_PIN PA4
153 #define SPI1_SCK_PIN PA5
154 #define SPI1_MISO_PIN PA6
155 #define SPI1_MOSI_PIN PA7
157 #define USE_SPI_DEVICE_2
158 #define SPI2_NSS_PIN PB12
159 #define SPI2_SCK_PIN PB13
160 #define SPI2_MISO_PIN PB14
161 #define SPI2_MOSI_PIN PB15
163 #define USE_SPI_DEVICE_3
164 #define SPI3_NSS_PIN PA15
165 #define SPI3_SCK_PIN PC10
166 #define SPI3_MISO_PIN PC11
167 #define SPI3_MOSI_PIN PC12
170 #define MAX7456_SPI_BUS BUS_SPI3
171 #define MAX7456_CS_PIN PA15
174 #define USE_FLASH_M25P16
175 #define M25P16_CS_PIN PB12
176 #define M25P16_SPI_BUS BUS_SPI2
177 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
180 #define ADC_CHANNEL_1_PIN PC1
181 #define ADC_CHANNEL_2_PIN PC2
182 #define ADC_CHANNEL_3_PIN PA0
184 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
185 #define VBAT_ADC_CHANNEL ADC_CHN_2
186 #define RSSI_ADC_CHANNEL ADC_CHN_3
188 #define SENSORS_SET (SENSOR_ACC | SENSOR_BARO)
190 #define USE_LED_STRIP
191 #define WS2811_PIN PB6
192 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_ST0_HANDLER
193 #define WS2811_DMA_STREAM DMA1_Stream0
194 #define WS2811_DMA_CHANNEL DMA_Channel_2
196 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX | FEATURE_VBAT | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_SOFTSERIAL | FEATURE_TELEMETRY)
197 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
198 #define SERIALRX_PROVIDER SERIALRX_SBUS
199 #define DISABLE_RX_PWM_FEATURE
201 #define TELEMETRY_UART SERIAL_PORT_SOFTSERIAL1
202 #define SERIALRX_UART SERIAL_PORT_USART1
203 #define SMARTAUDIO_UART SERIAL_PORT_USART4
205 //Default values for OmnibusF4V6,calib values for FireworksV2
206 #if !defined(OMNIBUSF4V6)
207 #define CURRENT_METER_SCALE 175
208 #define CURRENT_METER_OFFSET 326
211 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
213 // Number of available PWM outputs
214 #define MAX_PWM_OUTPUT_PORTS 8
215 #define TARGET_MOTOR_COUNT 6
217 #define TARGET_IO_PORTA 0xffff
218 #define TARGET_IO_PORTB 0xffff
219 #define TARGET_IO_PORTC 0xffff
220 #define TARGET_IO_PORTD 0xffff