vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / TMOTORVELOXF7V2 / target.h
blob09f30857ec89291684068e7661eae4d0296fb183
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 "TVF7"
23 #define USBD_PRODUCT_STRING "TMOTORVELOXF7V2"
25 #define LED0 PA14
26 #define LED1 PA13
28 #define BEEPER PC13
29 #define BEEPER_INVERTED
32 // SPI
33 #define USE_SPI
34 #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_SPI_DEVICE_2
40 #define SPI2_SCK_PIN PB13
41 #define SPI2_MISO_PIN PB14
42 #define SPI2_MOSI_PIN PB15
44 #define USE_SPI_DEVICE_3
45 #define SPI3_SCK_PIN PC10
46 #define SPI3_MISO_PIN PC11
47 #define SPI3_MOSI_PIN PC12
49 //GYRO
50 #define USE_IMU_ICM42605
51 #define IMU_ICM42605_ALIGN CW270_DEG
52 #define ICM42605_CS_PIN PB2
53 #define ICM42605_SPI_BUS BUS_SPI1
56 // *************** I2C /Baro/Mag *********************
57 #define USE_I2C
58 #define USE_I2C_DEVICE_1
59 #define I2C1_SCL PB8
60 #define I2C1_SDA PB9
62 #define USE_BARO
63 #define BARO_I2C_BUS BUS_I2C1
64 #define USE_BARO_ALL
66 #define USE_MAG
67 #define MAG_I2C_BUS BUS_I2C1
68 #define USE_MAG_ALL
70 #define TEMPERATURE_I2C_BUS BUS_I2C1
71 #define PITOT_I2C_BUS BUS_I2C1
72 #define RANGEFINDER_I2C_BUS BUS_I2C1
74 // *************** SPI2 OSD ***********************
75 #define USE_MAX7456
76 #define MAX7456_SPI_BUS BUS_SPI2
77 #define MAX7456_CS_PIN PB12
79 // *************** SPI3 SD BLACKBOX*******************
80 #define USE_FLASHFS
81 #define USE_FLASH_M25P16
82 #define M25P16_SPI_BUS BUS_SPI3
83 #define M25P16_CS_PIN PD2
84 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
86 // *************** UART *****************************
87 #define USE_VCP
89 #define USE_UART1
90 #define UART1_TX_PIN PA9
91 #define UART1_RX_PIN PA10
93 #define USE_UART2
94 #define UART2_TX_PIN PA2
95 #define UART2_RX_PIN PA3
97 #define USE_UART3
98 #define UART3_TX_PIN PB10
99 #define UART3_RX_PIN PB11
101 #define USE_UART4
102 #define UART4_TX_PIN PA0
103 #define UART4_RX_PIN PA1
105 #define USE_UART6
106 #define UART6_TX_PIN PC6
107 #define UART6_RX_PIN PC7
109 #define SERIAL_PORT_COUNT 6
111 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
112 #define SERIALRX_PROVIDER SERIALRX_SBUS
113 #define SERIALRX_UART SERIAL_PORT_USART1
115 // *************** ADC *****************************
116 #define USE_ADC
117 #define ADC_INSTANCE ADC1
118 #define ADC1_DMA_STREAM DMA2_Stream0
120 #define ADC_CHANNEL_1_PIN PC2
121 #define ADC_CHANNEL_2_PIN PC1
122 #define ADC_CHANNEL_3_PIN PC0
124 #define VBAT_ADC_CHANNEL ADC_CHN_1
125 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
126 #define RSSI_ADC_CHANNEL ADC_CHN_3
128 // *************** LEDSTRIP ************************
129 #define USE_LED_STRIP
130 #define WS2811_PIN PA8
132 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
133 #define CURRENT_METER_SCALE 250
135 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
137 #define TARGET_IO_PORTA 0xffff
138 #define TARGET_IO_PORTB 0xffff
139 #define TARGET_IO_PORTC 0xffff
140 #define TARGET_IO_PORTD 0xffff
142 #define MAX_PWM_OUTPUT_PORTS 8
143 #define USE_DSHOT
144 #define USE_SERIALSHOT
145 #define USE_DSHOT_DMAR
146 #define USE_ESC_SENSOR