Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / target / AOCODARCH7DUAL / target.h
blob1c12f198a03c194557b5e232a6ca9c13465b0ffb
1 /*
2 * This file is part of INAV.
4 * INAV is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * INAV is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with INAV. If not, see <http://www.gnu.org/licenses/>.
19 #pragma once
21 #define TARGET_BOARD_IDENTIFIER "AOH7"
22 #define USBD_PRODUCT_STRING "AocodaRCH7Dual"
24 #define USE_TARGET_CONFIG
26 #define LED0 PE3
27 #define LED1 PE4
29 #define BEEPER PA15
30 #define BEEPER_INVERTED
31 #define BEEPER_PWM_FREQUENCY 2500
33 // *************** IMU generic ***********************
34 #define USE_DUAL_GYRO
35 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
36 // *************** SPI1 IMU0 MPU6000 && BMI270 ****************
37 #define USE_SPI
38 #define USE_SPI_DEVICE_1
39 #define SPI1_SCK_PIN PA5
40 #define SPI1_MISO_PIN PA6
41 #define SPI1_MOSI_PIN PD7
43 #define USE_IMU_MPU6000
45 #define IMU_MPU6000_ALIGN CW0_DEG
46 #define MPU6000_SPI_BUS BUS_SPI1
47 #define MPU6000_CS_PIN PC15
48 #define MPU6000_EXTI_PIN PB2
50 #define USE_IMU_BMI270
52 #define IMU_BMI270_ALIGN_1 CW90_DEG
53 #define BMI270_SPI_BUS_1 BUS_SPI1
54 #define BMI270_CS_PIN_1 PC15
55 #define BMI270_EXTI_PIN_1 PB2
57 // *************** SPI4 IMU1 BMI270 **************
58 #define USE_SPI_DEVICE_4
59 #define SPI4_SCK_PIN PE12
60 #define SPI4_MISO_PIN PE13
61 #define SPI4_MOSI_PIN PE14
63 #define USE_IMU_BMI270
65 #define IMU_BMI270_ALIGN_2 CW180_DEG
66 #define BMI270_SPI_BUS_2 BUS_SPI4
67 #define BMI270_CS_PIN_2 PE11
68 #define BMI270_EXTI_PIN_2 PE15
70 // *************** SPI2 OSD ***********************
71 #define USE_SPI_DEVICE_2
72 #define SPI2_SCK_PIN PB13
73 #define SPI2_MISO_PIN PB14
74 #define SPI2_MOSI_PIN PB15
76 #define USE_MAX7456
77 #define MAX7456_SPI_BUS BUS_SPI2
78 #define MAX7456_CS_PIN PB12
80 // *************** SPI3 FLASH ***********************
81 #define USE_SPI_DEVICE_3
83 #define SPI3_NSS_PIN PD3
84 #define SPI3_SCK_PIN PB3
85 #define SPI3_MISO_PIN PB4
86 #define SPI3_MOSI_PIN PB5
88 #define SPI3_SCK_AF GPIO_AF6_SPI3
89 #define SPI3_MISO_AF GPIO_AF6_SPI3
90 #define SPI3_MOSI_AF GPIO_AF7_SPI3
92 #define W25N01G_SPI_BUS BUS_SPI3
93 #define W25N01G_CS_PIN SPI3_NSS_PIN
95 #define USE_BLACKBOX
96 #define USE_FLASHFS
97 #define USE_FLASH_W25N01G
98 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
100 // *************** I2C /Baro/Mag *********************
101 #define USE_I2C
102 #define USE_I2C_DEVICE_1
103 #define I2C1_SCL PB6
104 #define I2C1_SDA PB7
106 #define USE_I2C_DEVICE_2
107 #define I2C2_SCL PB10
108 #define I2C2_SDA PB11
110 #define USE_BARO
111 #define BARO_I2C_BUS BUS_I2C2
112 #define USE_BARO_BMP280
113 #define USE_BARO_MS5611
114 #define USE_BARO_DPS310
115 #define USE_BARO_SPL06
117 #define USE_MAG
118 #define MAG_I2C_BUS BUS_I2C1
119 #define USE_MAG_ALL
121 #define TEMPERATURE_I2C_BUS BUS_I2C1
122 #define PITOT_I2C_BUS BUS_I2C1
124 #define USE_RANGEFINDER
125 #define RANGEFINDER_I2C_BUS BUS_I2C1
128 // *************** UART *****************************
129 #define USE_VCP
130 #define VBUS_SENSING_PIN PE2
131 #define VBUS_SENSING_ENABLED
133 #define USE_UART1
134 #define UART1_TX_PIN PA9
135 #define UART1_RX_PIN PA10
137 #define USE_UART2
138 #define UART2_TX_PIN PD5
139 #define UART2_RX_PIN PD6
141 #define USE_UART3
142 #define UART3_TX_PIN PD8
143 #define UART3_RX_PIN PD9
145 #define USE_UART4
146 #define UART4_TX_PIN PB9
147 #define UART4_RX_PIN PB8
149 #define USE_UART6
150 #define UART6_TX_PIN PC6
151 #define UART6_RX_PIN PC7
153 #define USE_UART7
154 #define UART7_TX_PIN PE8
155 #define UART7_RX_PIN PE7
157 #define USE_UART8
158 #define UART8_TX_PIN PE1
159 #define UART8_RX_PIN PE0
161 #define SERIAL_PORT_COUNT 8
163 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
164 #define SERIALRX_PROVIDER SERIALRX_SBUS
166 // *************** ADC *****************************
167 #define USE_ADC
168 #define ADC_INSTANCE ADC1
170 #define ADC_CHANNEL_1_PIN PC0 //ADC123 VBAT1
171 #define ADC_CHANNEL_2_PIN PC1 //ADC123 CURR1
172 #define ADC_CHANNEL_3_PIN PC5 //ADC12 RSSI
173 #define ADC_CHANNEL_4_PIN PC4 //ADC12 AirS
174 #define ADC_CHANNEL_5_PIN PA4 //ADC12 VB2
175 #define ADC_CHANNEL_6_PIN PA7 //ADC12 CU2
177 #define VBAT_ADC_CHANNEL ADC_CHN_1
178 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
179 #define RSSI_ADC_CHANNEL ADC_CHN_3
180 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
182 // *************** PINIO ***************************
183 #define USE_PINIO
184 #define USE_PINIOBOX
185 #define PINIO1_PIN PD10 // VTX power switcher
186 #define PINIO2_PIN PD11 // 2xCamera switcher
188 // *************** LEDSTRIP ************************
189 #define USE_LED_STRIP
190 #define WS2811_PIN PA8
192 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
193 #define CURRENT_METER_SCALE 250
195 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
197 #define TARGET_IO_PORTA 0xffff
198 #define TARGET_IO_PORTB 0xffff
199 #define TARGET_IO_PORTC 0xffff
200 #define TARGET_IO_PORTD 0xffff
201 #define TARGET_IO_PORTE 0xffff
203 #define MAX_PWM_OUTPUT_PORTS 15
204 #define USE_DSHOT
205 #define USE_ESC_SENSOR