vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / IFLIGHTF7_TWING / target.h
blob1240089c76222086e53b329b16c06f430f13622b
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight 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 * Cleanflight 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
20 #define TARGET_BOARD_IDENTIFIER "IF7T"
22 #define USBD_PRODUCT_STRING "IFLIGHTF7_TWING"
24 #define LED0 PC4
26 #define BEEPER PC15
27 #define BEEPER_INVERTED
29 // *************** Gyro & ACC **********************
30 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS // Don't use common busdev descriptors for IMU
32 #define USE_SPI
33 #define USE_SPI_DEVICE_1
35 #define SPI1_SCK_PIN PA5
36 #define SPI1_MISO_PIN PA6
37 #define SPI1_MOSI_PIN PA7
39 #define USE_DUAL_GYRO
41 #define USE_IMU_MPU6500
42 #define IMU_0_ALIGN CW90_DEG
43 #define IMU_1_ALIGN CW0_DEG
45 #define MPU6500_0_CS_PIN PC3
46 #define MPU6500_0_SPI_BUS BUS_SPI1
48 #define MPU6500_1_CS_PIN PA15
49 #define MPU6500_1_SPI_BUS BUS_SPI1
51 // *************** I2C/Baro/Mag *********************
52 #define USE_I2C
53 #define USE_I2C_DEVICE_2
54 #define I2C2_SCL PB10
55 #define I2C2_SDA PB11
57 #define USE_BARO
58 #define BARO_I2C_BUS BUS_I2C2
59 #define USE_BARO_ALL
62 #define USE_MAG
63 #define MAG_I2C_BUS BUS_I2C2
64 #define USE_MAG_ALL
66 #define TEMPERATURE_I2C_BUS BUS_I2C2
68 #define PITOT_I2C_BUS BUS_I2C2
70 #define USE_RANGEFINDER
71 #define RANGEFINDER_I2C_BUS BUS_I2C2
73 // *************** FLASH **************************
74 #define M25P16_CS_PIN PB9
75 #define M25P16_SPI_BUS BUS_SPI3
76 #define USE_FLASHFS
77 #define USE_FLASH_M25P16
78 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
80 #define USE_SPI_DEVICE_3
81 #define SPI3_SCK_PIN PB3
82 #define SPI3_MISO_PIN PB4
83 #define SPI3_MOSI_PIN PB5
85 // *************** OSD *****************************
86 #define USE_SPI_DEVICE_2
87 #define SPI2_SCK_PIN PB13
88 #define SPI2_MISO_PIN PB14
89 #define SPI2_MOSI_PIN PB15
91 #define USE_MAX7456
92 #define MAX7456_SPI_BUS BUS_SPI2
93 #define MAX7456_CS_PIN PB12
95 // *************** UART *****************************
96 #define USE_VCP
98 #define USE_UART1
99 #define UART1_RX_PIN PA10
100 #define UART1_TX_PIN PA9
102 #define USE_UART2
103 #define UART2_RX_PIN PA3
104 #define UART2_TX_PIN PA2
106 #define USE_UART4
107 #define UART4_RX_PIN PC11
108 #define UART4_TX_PIN PC10
110 #define USE_UART5
111 #define UART5_RX_PIN PD2
112 #define UART5_TX_PIN PC12
114 #define SERIAL_PORT_COUNT 5
116 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
117 #define SERIALRX_PROVIDER SERIALRX_SBUS
118 #define SERIALRX_UART SERIAL_PORT_USART2
120 // *************** ADC *****************************
121 #define USE_ADC
122 #define ADC_INSTANCE ADC1
123 #define ADC1_DMA_STREAM DMA2_Stream0
124 #define ADC_CHANNEL_1_PIN PC1
125 #define ADC_CHANNEL_2_PIN PC2
126 #define ADC_CHANNEL_3_PIN PC0
128 #define VBAT_ADC_CHANNEL ADC_CHN_1
129 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
130 #define RSSI_ADC_CHANNEL ADC_CHN_3
132 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
134 #define USE_LED_STRIP
135 #define WS2811_PIN PA1
137 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
139 #define TARGET_IO_PORTA 0xffff
140 #define TARGET_IO_PORTB 0xffff
141 #define TARGET_IO_PORTC 0xffff
142 #define TARGET_IO_PORTD (BIT(2))
144 #define MAX_PWM_OUTPUT_PORTS 8
146 #define USE_DSHOT
147 #define USE_ESC_SENSOR