vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / NEUTRONRCF435SE / target.h
blob48ed7f0c61b07cca56047a84a3854714fca0bdcb
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 "NERC"
22 #define USBD_PRODUCT_STRING "NeutronRC F435 SE"
24 /**********swd debuger reserved *****************
26 * pa13 swdio
27 * pa14 swclk
28 * PA15 JTDI
29 * PB4 JREST
30 * pb3 swo /DTO
32 * other pin
34 * PB2 ->BOOT0 button
35 * PA8 MCO1
36 * PA11 OTG1 D+ DP
37 * PA10 OTG1 D- DN
38 * PH0 HEXT IN
39 * PH1 HEXT OUT
42 #define LED0 PC4
43 //#define LED1 PD14
45 #define BEEPER PC15
46 #define BEEPER_INVERTED
48 // *************** Gyro & ACC **********************
49 #define USE_SPI
50 #define USE_SPI_DEVICE_1
52 #define SPI1_SCK_PIN PA5
53 #define SPI1_MISO_PIN PA6
54 #define SPI1_MOSI_PIN PA7
55 #define SPI1_NSS_PIN PA15
57 // MPU6500
58 #define USE_IMU_MPU6500
59 #define IMU_MPU6500_ALIGN CW180_DEG
60 #define MPU6500_SPI_BUS BUS_SPI1
61 #define MPU6500_CS_PIN SPI1_NSS_PIN
63 // ICM42605/ICM42688P
64 #define USE_IMU_ICM42605
65 #define IMU_ICM42605_ALIGN CW180_DEG
66 #define ICM42605_SPI_BUS BUS_SPI1
67 #define ICM42605_CS_PIN SPI1_NSS_PIN
69 // BMI270
70 #define USE_IMU_BMI270
71 #define IMU_BMI270_ALIGN CW180_DEG
72 #define BMI270_SPI_BUS BUS_SPI1
73 #define BMI270_CS_PIN SPI1_NSS_PIN
75 // LSM6DXX
76 #define USE_IMU_LSM6DXX
77 #define IMU_LSM6DXX_ALIGN CW180_DEG
78 #define LSM6DXX_CS_PIN SPI1_NSS_PIN
79 #define LSM6DXX_SPI_BUS BUS_SPI1
82 // *************** I2C/Baro/Mag/EXT*********************
83 #define USE_I2C
84 #define USE_I2C_DEVICE_2
85 #define I2C2_SCL PB10 // SCL pad
86 #define I2C2_SDA PB11 // SDA pad
87 #define USE_I2C_PULLUP
89 #define USE_BARO
90 #define BARO_I2C_BUS BUS_I2C2
91 #define USE_BARO_BMP280
92 #define USE_BARO_DPS310
94 #define USE_MAG
95 #define MAG_I2C_BUS BUS_I2C2
96 #define USE_MAG_ALL
97 #define DEFAULT_I2C_BUS BUS_I2C2
99 // temperature sensors
100 //#define TEMPERATURE_I2C_BUS BUS_I2C1
101 // air speed sensors
102 //#define PITOT_I2C_BUS BUS_I2C1
103 // ranger sensors
104 //#define USE_RANGEFINDER
105 //#define RANGEFINDER_I2C_BUS BUS_I2C1
107 // *************** OSD *****************************
108 #define USE_SPI_DEVICE_2
109 #define SPI2_SCK_PIN PB13//PB13 on LQFP64
110 #define SPI2_MISO_PIN PB14//PB14 on LQFP64
111 #define SPI2_MOSI_PIN PB15//PB15 on LQFP64
112 #define SPI2_NSS_PIN PB12 //confirm on lqfp64
114 #define USE_MAX7456
115 #define MAX7456_SPI_BUS BUS_SPI2
116 #define MAX7456_CS_PIN SPI2_NSS_PIN
119 // *************** SD/BLACKBOX **************************
120 #define USE_SPI_DEVICE_3
121 #define SPI3_SCK_PIN PB3
122 #define SPI3_MISO_PIN PB4
123 #define SPI3_MOSI_PIN PB5
124 #define SPI3_NSS_PIN PB9 //confirm on lqfp64
126 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
127 #define USE_FLASHFS
128 #define USE_FLASH_M25P16
129 #define M25P16_SPI_BUS BUS_SPI3
130 #define M25P16_CS_PIN SPI3_NSS_PIN
132 #define USE_FLASH_W25N01G
133 #define W25N01G_SPI_BUS BUS_SPI3
134 #define W25N01G_CS_PIN SPI3_NSS_PIN
136 // *************** UART *****************************
137 #define USE_VCP
138 //#define USB_DETECT_PIN PC14
139 #define USE_USB_DETECT
141 #define USE_UART1
142 #define UART1_RX_PIN PA10
143 #define UART1_TX_PIN PA9
145 #define USE_UART2
146 #define UART2_RX_PIN PA3
147 #define UART2_TX_PIN PA2
149 #define USE_UART3
150 #define UART3_RX_PIN PB11
151 #define UART3_TX_PIN PB10
153 #define USE_UART4
154 #define UART4_RX_PIN PC11
155 #define UART4_TX_PIN PC10
157 #define USE_UART5
158 #define UART5_RX_PIN PD2
159 #define UART5_TX_PIN PC12
161 #define SERIAL_PORT_COUNT 6
163 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
164 #define SERIALRX_PROVIDER SERIALRX_CRSF
165 #define SERIALRX_UART SERIAL_PORT_USART2
167 // *************** ADC *****************************
168 #define USE_ADC
169 #define ADC_INSTANCE ADC1
171 #define ADC1_DMA_STREAM DMA2_CHANNEL1
172 #define ADC_CHANNEL_1_PIN PC2
173 #define ADC_CHANNEL_2_PIN PC1
174 //#define ADC_CHANNEL_3_PIN PB0
175 #define VBAT_ADC_CHANNEL ADC_CHN_1
176 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
177 //#define RSSI_ADC_CHANNEL ADC_CHN_3
179 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY| FEATURE_VBAT | FEATURE_OSD )
181 #define USE_LED_STRIP
182 #define WS2811_PIN PA1 //TIM2_CH3
184 // telemetry
185 // #define USE_SPEKTRUM_BIND
186 // #define BIND_PIN PA3 //UART2_RX_PIN
188 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
190 #define TARGET_IO_PORTA 0xffff
191 #define TARGET_IO_PORTB 0xffff
192 #define TARGET_IO_PORTC 0xffff
193 #define TARGET_IO_PORTD 0xffff
194 #define TARGET_IO_PORTE BIT(2)
196 #define MAX_PWM_OUTPUT_PORTS 8
197 #define USE_DSHOT
198 #define USE_ESC_SENSOR