vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / AOCODARCF722AIO / target.h
blob409bc03bfdd2c96aa00c6383765aaada3c5c90a4
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 TARGET_BOARD_IDENTIFIER "F722AIO"
21 #define USBD_PRODUCT_STRING "AocodaRCF722AIO"
23 #define LED0 PA4
25 #define USE_BEEPER
26 #define BEEPER PC13
27 #define BEEPER_INVERTED
29 /*** UART ***/
30 #define USB_IO
31 #define USE_VCP
33 #define USE_UART1
34 #define UART1_RX_PIN PA10
35 #define UART1_TX_PIN PA9
37 #define USE_UART2
38 #define UART2_RX_PIN PA3
39 #define UART2_TX_PIN PA2
41 #define USE_UART3
42 #define UART3_RX_PIN PB11
43 #define UART3_TX_PIN PB10
45 #define USE_UART4
46 #define UART4_RX_PIN PA1
47 #define UART4_TX_PIN PA0
49 #define USE_UART6
50 #define UART6_RX_PIN PC7
51 #define UART6_TX_PIN PC6
53 #define SERIAL_PORT_COUNT 6
55 /*** Gyro & Acc ***/
56 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
58 #define USE_SPI
59 #define USE_SPI_DEVICE_1
61 #define SPI1_SCK_PIN PA5
62 #define SPI1_MISO_PIN PA6
63 #define SPI1_MOSI_PIN PA7
65 #define USE_IMU_MPU6500
66 #define MPU6500_CS_PIN PB2
67 #define MPU6500_SPI_BUS BUS_SPI1
68 #define MPU6500_EXTI_PIN PC4
70 #define IMU_MPU6500_ALIGN CW180_DEG
72 #define USE_IMU_MPU6000
73 #define MPU6000_CS_PIN PB2
74 #define MPU6000_SPI_BUS BUS_SPI1
75 #define MPU6000_EXTI_PIN PC4
77 #define IMU_MPU6000_ALIGN CW180_DEG
79 #define USE_IMU_ICM42605
80 #define ICM42605_CS_PIN PB2
81 #define ICM42605_SPI_BUS BUS_SPI1
82 #define ICM42605_EXTI_PIN PC4
84 #define IMU_ICM42605_ALIGN CW180_DEG
86 /*** I2C (Baro & Mag) ***/
87 #define USE_I2C
89 #define USE_I2C_DEVICE_1
90 #define I2C1_SCL PB8
91 #define I2C1_SDA PB9
93 // Baro
94 #define USE_BARO
95 #define BARO_I2C_BUS BUS_I2C1
96 #define USE_BARO_BMP280
97 #define USE_BARO_MS5611
98 #define USE_BARO_SPL06
99 #define USE_BARO_DPS310
101 // Mag
102 #define USE_MAG
103 #define MAG_I2C_BUS BUS_I2C1
104 #define USE_MAG_ALL
106 /*** Onboard Flash ***/
107 #define USE_SPI_DEVICE_3
108 #define SPI3_SCK_PIN PC10
109 #define SPI3_MISO_PIN PC11
110 #define SPI3_MOSI_PIN PC12
112 #define M25P16_SPI_BUS BUS_SPI3
113 #define M25P16_CS_PIN PD2
115 #define W25N01G_SPI_BUS BUS_SPI3
116 #define W25N01G_CS_PIN PD2
118 #define USE_FLASHFS
119 #define USE_FLASH_M25P16
120 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
122 /*** OSD ***/
123 #define USE_OSD
124 #define USE_SPI_DEVICE_2
125 #define SPI2_SCK_PIN PB13
126 #define SPI2_MISO_PIN PB14
127 #define SPI2_MOSI_PIN PB15
129 #define USE_MAX7456
130 #define MAX7456_SPI_BUS BUS_SPI2
131 #define MAX7456_CS_PIN PB12
133 /*** ADC ***/
134 #define USE_ADC
135 #define ADC_CHANNEL_1_PIN PC2
136 #define ADC_CHANNEL_2_PIN PC0
137 #define ADC_CHANNEL_3_PIN PC1
139 #define VBAT_ADC_CHANNEL ADC_CHN_1
140 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
141 #define RSSI_ADC_CHANNEL ADC_CHN_2
143 /*** LED ***/
144 #define USE_LED_STRIP
145 #define WS2811_PIN PA8
147 /*** Optical Flow & Lidar ***/
148 #define USE_RANGEFINDER
149 #define USE_RANGEFINDER_MSP
150 #define USE_OPFLOW
151 #define USE_OPFLOW_MSP
153 /*** Misc ***/
154 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
155 #define USE_DSHOT
156 #define USE_ESC_SENSOR
157 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
159 #define SERIALRX_UART SERIAL_PORT_USART2
160 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
161 #define SERIALRX_PROVIDER SERIALRX_CRSF
163 #define MAX_PWM_OUTPUT_PORTS 8
165 #define CURRENT_METER_SCALE 250
167 #define TARGET_IO_PORTA 0xffff
168 #define TARGET_IO_PORTB 0xffff
169 #define TARGET_IO_PORTC 0xffff
170 #define TARGET_IO_PORTD (BIT(2))