Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / target / AOCODARCF4V2 / target.h
blob104ac193afc51ba2509771e56ffe68dec4edadc4
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/>.
18 #pragma once
20 #define USE_TARGET_CONFIG
22 #define TARGET_BOARD_IDENTIFIER "AOF4V2"
23 #define USBD_PRODUCT_STRING "AocodaRCF4V2"
25 // ******** Board LEDs **********************
26 #define LED0 PC13
28 // ******* Beeper ***********
29 #define BEEPER PB8
30 #define BEEPER_INVERTED
33 // ******* GYRO and ACC ********
34 #define USE_IMU_MPU6500
35 #define IMU_MPU6500_ALIGN CW0_DEG
36 #define MPU6500_SPI_BUS BUS_SPI1
37 #define MPU6500_CS_PIN PA4
39 #define USE_IMU_MPU6000
40 #define IMU_MPU6000_ALIGN CW270_DEG
41 #define MPU6000_SPI_BUS BUS_SPI1
42 #define MPU6000_CS_PIN PA4
45 // *************** Baro **************************
46 #define USE_I2C
47 #define USE_I2C_DEVICE_1
49 #define I2C1_SCL PB6 // SCL
50 #define I2C1_SDA PB7 // SDA
51 #define DEFAULT_I2C_BUS BUS_I2C1
53 #define USE_BARO
54 #define BARO_I2C_BUS DEFAULT_I2C_BUS
56 #define USE_BARO_BMP280
57 #define USE_BARO_MS5611
58 #define USE_BARO_DPS310
60 //*********** Magnetometer / Compass *************
61 #define USE_MAG
62 #define MAG_I2C_BUS DEFAULT_I2C_BUS
63 #define USE_MAG_ALL
65 // ******* SERIAL ********
66 #define USE_VCP
67 #define VBUS_SENSING_PIN PB12
68 #define VBUS_SENSING_ENABLED
70 #define USE_UART1
71 #define UART1_TX_PIN PA9
72 #define UART1_RX_PIN PA10
74 #define USE_UART2
75 #define UART2_TX_PIN PA2
76 #define UART2_RX_PIN PA3
78 #define USE_UART3
79 #define UART3_TX_PIN PC10
80 #define UART3_RX_PIN PC11
82 #define USE_UART4
83 #define UART4_TX_PIN PA0
84 #define UART4_RX_PIN PA1
86 #define USE_UART5
87 #define UART5_TX_PIN PD2
88 #define UART5_RX_PIN PC12
91 #define SERIAL_PORT_COUNT 6
94 // ******* SPI ********
95 #define USE_SPI
97 #define USE_SPI_DEVICE_1
98 #define SPI1_NSS_PIN PA4
99 #define SPI1_SCK_PIN PA5
100 #define SPI1_MISO_PIN PA6
101 #define SPI1_MOSI_PIN PA7
103 #define USE_SPI_DEVICE_2
104 #define SPI2_NSS_PIN PA13
105 #define SPI2_SCK_PIN PB13
106 #define SPI2_MISO_PIN PB14
107 #define SPI2_MOSI_PIN PB15
109 #define USE_SPI_DEVICE_3
110 #define SPI3_NSS_PIN PC0
111 #define SPI3_SCK_PIN PB3
112 #define SPI3_MISO_PIN PB4
113 #define SPI3_MOSI_PIN PB5
115 // ******* ADC ********
116 #define USE_ADC
117 #define ADC_CHANNEL_1_PIN PC1
118 #define ADC_CHANNEL_2_PIN PC2
119 #define ADC_CHANNEL_3_PIN PC3
121 #define VBAT_ADC_CHANNEL ADC_CHN_2
122 #define RSSI_ADC_CHANNEL ADC_CHN_3
123 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
125 #define VBAT_SCALE_DEFAULT 1100
127 // ******* OSD ********
128 #define USE_OSD
129 #define USE_MAX7456
130 #define MAX7456_SPI_BUS BUS_SPI2
131 #define MAX7456_CS_PIN PA13
133 //******* FLASH ********
134 #define USE_FLASHFS
135 #define USE_FLASH_M25P16
136 #define M25P16_SPI_BUS BUS_SPI3
137 #define M25P16_CS_PIN PC0
139 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
141 //************ LEDSTRIP *****************
142 #define USE_LED_STRIP
143 #define WS2811_PIN PB1
145 // ******* FEATURES ********
146 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
147 #define SERIALRX_UART SERIAL_PORT_USART2
148 #define SERIALRX_PROVIDER SERIALRX_SBUS
150 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
152 #define TARGET_IO_PORTA 0xffff
153 #define TARGET_IO_PORTB 0xffff
154 #define TARGET_IO_PORTC 0xffff
155 #define TARGET_IO_PORTD 0xffff
157 #define MAX_PWM_OUTPUT_PORTS 10
159 // ESC-related features
160 #define USE_DSHOT
161 #define USE_SERIALSHOT
162 #define USE_ESC_SENSOR
163 #define USE_SERIAL_4WAY_BLHELI_INTERFACE