vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / TMOTORF7 / target.h
blob068894323d9ae3c87ded21d930e7c0d1c8e6ce9f
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 #ifdef TMOTORF7
22 #define TARGET_BOARD_IDENTIFIER "TMR7"
23 #define USBD_PRODUCT_STRING "TMOTORF7"
24 #endif
25 #ifdef TMOTORF7HD
26 #define TARGET_BOARD_IDENTIFIER "TMR7HD"
27 #define USBD_PRODUCT_STRING "TMOTORF7HD"
28 #endif
30 #define LED0 PB2
32 #define BEEPER PC13
33 #define BEEPER_INVERTED
35 // *************** SPI1 Gyro & ACC *******************
36 #define USE_SPI
37 #define USE_SPI_DEVICE_1
38 #define SPI1_SCK_PIN PA5
39 #define SPI1_MISO_PIN PA6
40 #define SPI1_MOSI_PIN PA7
42 #define USE_IMU_MPU6000
43 #define IMU_MPU6000_ALIGN CW0_DEG
44 #define MPU6000_CS_PIN PA4
45 #define MPU6000_SPI_BUS BUS_SPI1
47 // *************** I2C Mag *********************
48 #define USE_I2C
49 #define USE_I2C_DEVICE_2
50 #define I2C2_SCL PB10
51 #define I2C2_SDA PB11
53 #define USE_BARO
54 #define BARO_I2C_BUS BUS_I2C2
55 #define USE_BARO_ALL
57 #define USE_MAG
58 #define MAG_I2C_BUS BUS_I2C2
59 #define USE_MAG_ALL
61 // *************** SPI2 OSD ***********************
62 #define USE_SPI_DEVICE_2
63 #define SPI2_SCK_PIN PB13
64 #define SPI2_MISO_PIN PB14
65 #define SPI2_MOSI_PIN PB15
67 #define USE_OSD
69 #ifndef TMOTORF7HD
70 #define USE_MAX7456
71 #define MAX7456_SPI_BUS BUS_SPI2
72 #define MAX7456_CS_PIN PB12
73 #endif
75 // *************** SPI3 BARO & BLACKBOX*******************
76 #define USE_SPI_DEVICE_3
77 #define SPI3_SCK_PIN PB3
78 #define SPI3_MISO_PIN PB4
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 PC8
85 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
87 #define USE_BARO
88 #define USE_BARO_BMP280
89 #define USE_BARO_SPI_BMP280
90 #define BMP280_SPI_BUS BUS_SPI3
91 #define BMP280_CS_PIN PC15
93 // *************** UART *****************************
94 #define USE_VCP
96 #define USE_UART1
97 #define UART1_TX_PIN PA9
98 #define UART1_RX_PIN PA10
100 #define USE_UART2
101 #define UART2_TX_PIN PA2
102 #define UART2_RX_PIN PA3
104 #define USE_UART3
105 #define UART3_TX_PIN PC10
106 #define UART3_RX_PIN PC11
108 #define USE_UART4
109 #define UART4_TX_PIN PA0
110 #define UART4_RX_PIN PA1
112 #define USE_UART5
113 #define UART5_TX_PIN PC12
114 #define UART5_RX_PIN PD2
116 #define USE_ESCSERIAL
117 #define ESCSERIAL_TIMER_TX_PIN PA15
119 #define SERIAL_PORT_COUNT 6
121 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
122 #define SERIALRX_PROVIDER SERIALRX_SBUS
123 #define SERIALRX_UART SERIAL_PORT_USART5
124 #define SBUS_TELEMETRY_UART SERIAL_PORT_USART1
126 // *************** ADC *****************************
127 #define USE_ADC
128 #define ADC_INSTANCE ADC1
129 #define ADC1_DMA_STREAM DMA2_Stream0
131 #define ADC_CHANNEL_1_PIN PC1
132 #define ADC_CHANNEL_2_PIN PC2
133 #define ADC_CHANNEL_3_PIN PC3
135 #define VBAT_ADC_CHANNEL ADC_CHN_1
136 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
137 #define RSSI_ADC_CHANNEL ADC_CHN_3
139 // *************** LEDSTRIP ************************
140 #define USE_LED_STRIP
141 #define WS2811_PIN PA8
143 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_BLACKBOX)
144 #define CURRENT_METER_SCALE 179
146 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
148 #define TARGET_IO_PORTA 0xffff
149 #define TARGET_IO_PORTB 0xffff
150 #define TARGET_IO_PORTC 0xffff
151 #define TARGET_IO_PORTD 0x0004
153 #define MAX_PWM_OUTPUT_PORTS 8
154 #define USE_DSHOT
155 #define USE_ESC_SENSOR