Merge pull request #10558 from iNavFlight/MrD_Correct-comments-on-OSD-symbols
[inav.git] / src / main / target / TMOTORF7V2 / target.h
blobf5def98a403999e7fdd82fedb60fa5ee3a243e60
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 "TMTRF7V2"
21 #define USBD_PRODUCT_STRING "TmotorF7V2"
23 #define LED0 PC14
24 #define BEEPER PC13
25 #define BEEPER_INVERTED
27 // UARTs
28 #define USE_VCP
30 #define USE_UART1
31 #define UART1_RX_PIN PA10
32 #define UART1_TX_PIN PA9
34 #define USE_UART2
35 #define UART2_RX_PIN PA3
36 #define UART2_TX_PIN PA2
38 #define USE_UART3
39 #define UART3_RX_PIN PB11
40 #define UART3_TX_PIN PB10
42 #define USE_UART4
43 #define UART4_RX_PIN PA1
44 #define UART4_TX_PIN PA0
46 #define USE_UART5
47 #define UART5_RX_PIN PD2
48 #define UART5_TX_PIN PC12
50 #define USE_UART6
51 #define UART6_RX_PIN PC7
52 #define UART6_TX_PIN PC6
54 #define SERIAL_PORT_COUNT 7
56 // GYRO -- SPI1
57 #define USE_SPI
59 #define USE_SPI_DEVICE_1
60 #define SPI1_SCK_PIN PA5
61 #define SPI1_MISO_PIN PA6
62 #define SPI1_MOSI_PIN PA7
64 #define MPU6000_CS_PIN PA4
65 #define MPU6000_SPI_BUS BUS_SPI1
67 #define USE_IMU_MPU6000
68 #define IMU_MPU6000_ALIGN CW0_DEG
70 #define USE_IMU_ICM42605
71 #define IMU_ICM42605_ALIGN CW0_DEG
72 #define ICM42605_CS_PIN PA4
73 #define ICM42605_SPI_BUS BUS_SPI1
75 // OSD -- SPI2
76 #define USE_SPI_DEVICE_2
77 #define SPI2_SCK_PIN PB13
78 #define SPI2_MISO_PIN PB14
79 #define SPI2_MOSI_PIN PB15
81 #define USE_MAX7456
82 #define MAX7456_SPI_BUS BUS_SPI2
83 #define MAX7456_CS_PIN PB12
85 // FLASH 16MB -- SPI3
86 #define USE_SPI_DEVICE_3
87 #define SPI3_SCK_PIN PC10
88 #define SPI3_MISO_PIN PC11
89 #define SPI3_MOSI_PIN PB2
90 #define SPI3_SCK_AF GPIO_AF6_SPI3
91 #define SPI3_MISO_AF GPIO_AF6_SPI3
92 #define SPI3_MOSI_AF GPIO_AF7_SPI3
94 #define USE_FLASHFS
95 #define USE_FLASH_M25P16
96 #define M25P16_SPI_BUS BUS_SPI3
97 #define M25P16_CS_PIN PA15
98 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
100 // BMP280 BARO --- I2C1
101 #define USE_I2C
102 #define USE_BARO
103 #define USE_BARO_ALL
104 #define BARO_I2C_BUS BUS_I2C1
106 #define USE_I2C_DEVICE_1
107 #define I2C1_SCL PB8
108 #define I2C1_SDA PB9
110 #define USE_MAG
111 #define MAG_I2C_BUS BUS_I2C1
112 #define USE_MAG_ALL
114 #define TEMPERATURE_I2C_BUS BUS_I2C1
115 #define PITOT_I2C_BUS BUS_I2C1
117 #define USE_RANGEFINDER
118 #define RANGEFINDER_I2C_BUS BUS_I2C1
120 // ADC
121 #define USE_ADC
122 #define ADC_CHANNEL_1_PIN PC2
123 #define ADC_CHANNEL_2_PIN PC3
124 #define ADC_CHANNEL_3_PIN PC0
126 #define VBAT_ADC_CHANNEL ADC_CHN_1
127 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
128 #define RSSI_ADC_CHANNEL ADC_CHN_3
130 // PINIO to disable BT
131 #define USE_PINIO
132 #define USE_PINIOBOX
133 #define PINIO1_PIN PC1
134 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
135 // PINIO to disable VTX
136 #define PINIO2_PIN PC15
138 // *************** LEDSTRIP ************************
139 #define USE_LED_STRIP
140 #define WS2811_PIN PA8
142 // FC Default Config
143 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
144 #define USE_DSHOT
145 #define USE_ESC_SENSOR
146 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
148 #define SERIALRX_UART SERIAL_PORT_USART2
149 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
150 #define SERIALRX_PROVIDER SERIALRX_SBUS
152 #define MAX_PWM_OUTPUT_PORTS 9
154 #define CURRENT_METER_SCALE 250
156 // Used Pins
157 #define TARGET_IO_PORTA 0xffff
158 #define TARGET_IO_PORTB 0xffff
159 #define TARGET_IO_PORTC 0xffff
160 #define TARGET_IO_PORTD (BIT(2))