vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / NEUTRONRCH7BT / target.h
blob9f4ffd118d5f9b9e9aec71df540db331b5c31f20
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 "NH7BT"
22 #define USBD_PRODUCT_STRING "NeuronRC H7 BT"
24 #define USE_TARGET_CONFIG
26 #define LED0 PE3
27 #define LED1 PE4
29 #define BEEPER PA15
30 #define BEEPER_INVERTED
32 // *************** IMU generic ***********************
33 // #define USE_DUAL_GYRO
34 // #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
36 // *************** SPI1 IMU0 BMI270 *****************
37 #define USE_SPI
38 #define USE_SPI_DEVICE_1
39 #define SPI1_SCK_PIN PA5
40 #define SPI1_MISO_PIN PA6
41 #define SPI1_MOSI_PIN PD7
43 #define USE_IMU_BMI270
45 #define IMU_BMI270_ALIGN CW270_DEG
46 #define BMI270_SPI_BUS BUS_SPI1
47 #define BMI270_CS_PIN PC15
49 // *************** SPI4 IMU1 BMI270 *****************
50 #define USE_SPI_DEVICE_4
51 #define SPI4_SCK_PIN PE12
52 #define SPI4_MISO_PIN PE13
53 #define SPI4_MOSI_PIN PE14
55 // #define USE_IMU_BMI270
57 // #define IMU_BMI270_ALIGN CW0_DEG_FLIP
58 // #define BMI270_SPI_BUS BUS_SPI4
59 // #define BMI270_CS_PIN PE11
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_MAX7456
68 #define MAX7456_SPI_BUS BUS_SPI2
69 #define MAX7456_CS_PIN PB12
71 // *************** I2C /Baro/Mag *********************
72 #define USE_I2C
73 #define USE_I2C_DEVICE_1 // I2C1 is the broken out I2C bus
74 #define I2C1_SCL PB6
75 #define I2C1_SDA PB7
77 #define USE_I2C_DEVICE_2 // I2C2 is not broken out
78 #define I2C2_SCL PB10
79 #define I2C2_SDA PB11
81 #define USE_BARO
82 #define BARO_I2C_BUS BUS_I2C2
83 #define USE_BARO_BMP280
84 #define USE_BARO_MS5611
85 #define USE_BARO_DPS310
86 #define USE_BARO_SPL06
88 #define USE_MAG
89 #define MAG_I2C_BUS BUS_I2C1
90 #define USE_MAG_ALL
92 #define TEMPERATURE_I2C_BUS BUS_I2C1
93 #define PITOT_I2C_BUS BUS_I2C1
95 #define USE_RANGEFINDER
96 #define RANGEFINDER_I2C_BUS BUS_I2C1
98 // *************** UART *****************************
99 #define USE_VCP
101 #define USE_UART1
102 #define UART1_TX_PIN PA9
103 #define UART1_RX_PIN PA10
105 #define USE_UART2
106 #define UART2_TX_PIN PD5
107 #define UART2_RX_PIN PD6
109 // UART3 is connected to the BT chip
110 #define USE_UART3
111 #define UART3_TX_PIN PD8
112 #define UART3_RX_PIN PD9
114 #define USE_UART4
115 #define UART4_TX_PIN PB9
116 #define UART4_RX_PIN PB8
118 #define USE_UART6
119 #define UART6_TX_PIN PC6
120 #define UART6_RX_PIN PC7
122 #define USE_UART7
123 #define UART7_TX_PIN PE8
124 #define UART7_RX_PIN PE7
126 #define USE_UART8
127 #define UART8_TX_PIN PE1
128 #define UART8_RX_PIN PE0
130 #define SERIAL_PORT_COUNT 8
132 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
133 #define SERIALRX_PROVIDER SERIALRX_SBUS
134 #define SERIALRX_UART SERIAL_PORT_USART6
136 // *************** SDIO SD BLACKBOX*******************
137 #define USE_SDCARD
138 #define USE_SDCARD_SDIO
139 #define SDCARD_SDIO_DEVICE SDIODEV_1
140 #define SDCARD_SDIO_4BIT
142 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
144 // *************** ADC *****************************
145 #define USE_ADC
146 #define ADC_INSTANCE ADC1
148 #define ADC_CHANNEL_1_PIN PC0 // VBAT1
149 #define ADC_CHANNEL_2_PIN PC1 // CURR1
150 #define ADC_CHANNEL_3_PIN PC4 // AirS
151 #define ADC_CHANNEL_4_PIN PA4 // VBAT2
152 #define ADC_CHANNEL_5_PIN PA7 // CURR2
154 #define VBAT_ADC_CHANNEL ADC_CHN_1
155 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
156 #define AIRSPEED_ADC_CHANNEL ADC_CHN_3
158 // *************** PINIO ***************************
159 #define USE_PINIO
160 #define USE_PINIOBOX
161 #define PINIO1_PIN PD10 // Vsw control
162 #define PINIO2_PIN PD11 // Cam1/Cam2 switch control
163 #define PINIO3_PIN PC3 // BT Mode
165 // *************** LEDSTRIP ************************
166 #define USE_LED_STRIP
167 #define WS2811_PIN PA8
169 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
170 #define CURRENT_METER_SCALE 250
172 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
174 #define TARGET_IO_PORTA 0xffff
175 #define TARGET_IO_PORTB 0xffff
176 #define TARGET_IO_PORTC 0xffff
177 #define TARGET_IO_PORTD 0xffff
178 #define TARGET_IO_PORTE 0xffff
180 #define MAX_PWM_OUTPUT_PORTS 8
181 #define USE_DSHOT
182 #define USE_ESC_SENSOR