vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / FLYCOLORF7V2 / target.h
blob8222e379d8d635dc57242432b5217c8012430979
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 "FL72"
22 #define USBD_PRODUCT_STRING "Flycolor F7 V2"
24 #define LED0 PC15
26 #define BEEPER PC14
27 #define BEEPER_INVERTED
29 // *************** SPI1 Gyro & ACC *******************
31 #define USE_SPI
32 #define USE_SPI_DEVICE_1
33 #define SPI1_SCK_PIN PA5
34 #define SPI1_MISO_PIN PA6
35 #define SPI1_MOSI_PIN PA7
37 #define USE_IMU_MPU6500
38 #define IMU_MPU6500_ALIGN CW180_DEG_FLIP
39 #define MPU6500_CS_PIN PA4
40 #define MPU6500_SPI_BUS BUS_SPI1
42 // *************** I2C /Baro/Mag *********************
43 #define USE_I2C
44 #define USE_I2C_DEVICE_1
45 #define I2C1_SCL PB6
46 #define I2C1_SDA PB7
48 #define USE_I2C_DEVICE_2
49 #define I2C2_SCL PB10
50 #define I2C2_SDA PB11
51 #define I2C_DEVICE_2_SHARES_UART3
53 #define USE_BARO
54 #define BARO_I2C_BUS BUS_I2C1
55 #define USE_BARO_ALL
57 #define USE_MAG
58 #define MAG_I2C_BUS BUS_I2C2
59 #define USE_MAG_ALL
61 #define TEMPERATURE_I2C_BUS BUS_I2C2
62 #define PITOT_I2C_BUS BUS_I2C2
63 #define RANGEFINDER_I2C_BUS BUS_I2C2
65 // *************** SPI2 OSD ***********************
66 #define USE_SPI_DEVICE_2
67 #define SPI2_SCK_PIN PB13
68 #define SPI2_MISO_PIN PB14
69 #define SPI2_MOSI_PIN PB15
71 #define USE_MAX7456
72 #define MAX7456_SPI_BUS BUS_SPI2
73 #define MAX7456_CS_PIN PB12
75 // *************** SPI3 SD BLACKBOX*******************
76 #define USE_SPI_DEVICE_3
77 #define SPI3_SCK_PIN PC10
78 #define SPI3_MISO_PIN PC11
79 #define SPI3_MOSI_PIN PB5
81 #define USE_FLASHFS
82 #define USE_FLASH_M25P16
83 #define M25P16_SPI_BUS BUS_SPI3
84 #define M25P16_CS_PIN PC13
85 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
87 // *************** UART *****************************
88 #define USE_VCP
90 #define USE_UART1
91 #define UART1_TX_PIN PA9
92 #define UART1_RX_PIN PA10
94 #define USE_UART2
95 #define UART2_TX_PIN PA2
96 #define UART2_RX_PIN PA3
98 #define USE_UART3
99 #define UART3_TX_PIN PB10
100 #define UART3_RX_PIN PB11
102 #define USE_UART4
103 #define UART4_TX_PIN PA0
104 #define UART4_RX_PIN PA1
106 #define USE_UART5
107 #define UART5_TX_PIN PC12
108 #define UART5_RX_PIN PD2
110 #define USE_UART6
111 #define UART6_TX_PIN PC6
112 #define UART6_RX_PIN PC7
114 #define SERIAL_PORT_COUNT 7
116 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
117 #define SERIALRX_PROVIDER SERIALRX_SBUS
118 #define SERIALRX_UART SERIAL_PORT_USART1
120 // *************** ADC *****************************
121 #define USE_ADC
122 #define ADC_INSTANCE ADC1
123 #define ADC1_DMA_STREAM DMA2_Stream0
125 #define ADC_CHANNEL_1_PIN PC1
126 #define ADC_CHANNEL_2_PIN PC2
127 #define ADC_CHANNEL_3_PIN PC0
129 #define VBAT_ADC_CHANNEL ADC_CHN_1
130 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
131 #define RSSI_ADC_CHANNEL ADC_CHN_2
133 // *************** PINIO ***************************
134 #define USE_PINIO
135 #define USE_PINIOBOX
136 #define PINIO1_PIN PB8
137 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
139 // *************** LEDSTRIP ************************
140 #define USE_LED_STRIP
141 #define WS2811_PIN PA8
143 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
144 #define CURRENT_METER_SCALE 250
145 #define CURRENT_METER_OFFSET 0
147 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
149 #define TARGET_IO_PORTA 0xffff
150 #define TARGET_IO_PORTB 0xffff
151 #define TARGET_IO_PORTC 0xffff
152 #define TARGET_IO_PORTD 0xffff
154 #define MAX_PWM_OUTPUT_PORTS 6
155 #define USE_DSHOT
156 #define USE_SERIALSHOT
157 #define USE_ESC_SENSOR