Update DPS310 driver to support SPL07-003
[inav.git] / src / main / target / NEUTRONRCF435MINI / target.h
blob2e90f48a69d5955e6a7912028619a500b3c2a7b5
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 "NeuronRC F435 MINI"
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 PC13
43 #define LED1 PC14
44 #define LED0_INVERTED
45 #define LED1_INVERTED
47 #define BEEPER PC15
48 #define BEEPER_INVERTED
50 // *************** Gyro & ACC **********************
51 #define USE_SPI
52 #define USE_SPI_DEVICE_1
54 #define SPI1_SCK_PIN PA5
55 #define SPI1_MISO_PIN PA6
56 #define SPI1_MOSI_PIN PA7
57 #define SPI1_NSS_PIN PA4
59 // MPU6500
60 #define USE_IMU_MPU6500
61 #define IMU_MPU6500_ALIGN CW0_DEG
62 #define MPU6500_SPI_BUS BUS_SPI1
63 #define MPU6500_CS_PIN SPI1_NSS_PIN
65 // ICM42605/ICM42688P
66 #define USE_IMU_ICM42605
67 #define IMU_ICM42605_ALIGN CW0_DEG
68 #define ICM42605_SPI_BUS BUS_SPI1
69 #define ICM42605_CS_PIN SPI1_NSS_PIN
71 // BMI270
72 #define USE_IMU_BMI270
73 #define IMU_BMI270_ALIGN CW0_DEG
74 #define BMI270_SPI_BUS BUS_SPI1
75 #define BMI270_CS_PIN SPI1_NSS_PIN
77 // LSM6DXX
78 #define USE_IMU_LSM6DXX
79 #define IMU_LSM6DXX_ALIGN CW0_DEG
80 #define LSM6DXX_CS_PIN SPI1_NSS_PIN
81 #define LSM6DXX_SPI_BUS BUS_SPI1
84 // *************** I2C/Baro/Mag/EXT*********************
85 #define USE_I2C
86 #define USE_I2C_DEVICE_2
87 #define I2C2_SCL PH2 // SCL pad
88 #define I2C2_SDA PH3 // SDA pad
89 #define USE_I2C_PULLUP
91 #define USE_BARO
92 #define BARO_I2C_BUS BUS_I2C2
93 #define USE_BARO_BMP280
94 #define USE_BARO_DPS310
96 #define USE_MAG
97 #define MAG_I2C_BUS BUS_I2C2
98 #define USE_MAG_ALL
99 #define DEFAULT_I2C_BUS BUS_I2C2
101 // temperature sensors
102 //#define TEMPERATURE_I2C_BUS BUS_I2C1
103 // air speed sensors
104 //#define PITOT_I2C_BUS BUS_I2C1
105 // ranger sensors
106 //#define USE_RANGEFINDER
107 //#define RANGEFINDER_I2C_BUS BUS_I2C1
109 // *************** OSD *****************************
110 #define USE_SPI_DEVICE_2
111 #define SPI2_SCK_PIN PB13
112 #define SPI2_MISO_PIN PB14
113 #define SPI2_MOSI_PIN PB15
114 #define SPI2_NSS_PIN PB12
116 #define USE_MAX7456
117 #define MAX7456_SPI_BUS BUS_SPI2
118 #define MAX7456_CS_PIN SPI2_NSS_PIN
121 // *************** SD/BLACKBOX **************************
123 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
124 #define USE_FLASHFS
125 #define USE_FLASH_M25P16
126 #define M25P16_SPI_BUS BUS_SPI2
127 #define M25P16_CS_PIN PB5
129 #define USE_FLASH_W25N01G
130 #define W25N01G_SPI_BUS BUS_SPI2
131 #define W25N01G_CS_PIN PB5
133 // *************** UART *****************************
134 #define USE_VCP
135 //#define USB_DETECT_PIN PC14
136 #define USE_USB_DETECT
138 #define USE_UART1
139 #define UART1_RX_PIN PA10
140 #define UART1_TX_PIN PA9
142 #define USE_UART2
143 #define UART2_RX_PIN PB0
144 #define UART2_TX_PIN PA2
146 #define USE_UART3
147 #define UART3_RX_PIN PB11
148 #define UART3_TX_PIN PB10
150 #define USE_UART5
151 #define UART5_RX_PIN PB8
152 #define UART5_TX_PIN PB9
154 #define USE_UART7
155 #define UART7_RX_PIN PB3
156 #define UART7_TX_PIN PB4
158 #define SERIAL_PORT_COUNT 6
160 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
161 #define SERIALRX_PROVIDER SERIALRX_CRSF
162 #define SERIALRX_UART SERIAL_PORT_USART7
164 // *************** ADC *****************************
165 #define USE_ADC
166 #define ADC_INSTANCE ADC1
168 #define ADC1_DMA_STREAM DMA2_CHANNEL1
169 #define ADC_CHANNEL_1_PIN PA0
170 #define ADC_CHANNEL_2_PIN PA1
171 //#define ADC_CHANNEL_3_PIN PB0
172 #define VBAT_ADC_CHANNEL ADC_CHN_1
173 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
174 //#define RSSI_ADC_CHANNEL ADC_CHN_3
176 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY| FEATURE_VBAT | FEATURE_OSD )
178 // #define USE_LED_STRIP
179 // #define WS2811_PIN PB10 //TIM2_CH3
181 // #define USE_SPEKTRUM_BIND
182 // #define BIND_PIN PA3 //UART2_RX_PIN
184 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
186 #define TARGET_IO_PORTA 0xffff
187 #define TARGET_IO_PORTB 0xffff
188 #define TARGET_IO_PORTC 0xffff
189 #define TARGET_IO_PORTD 0xffff
190 #define TARGET_IO_PORTE BIT(2)
191 #define TARGET_IO_PORTH BIT(1)|BIT(2)|BIT(3)
193 #define MAX_PWM_OUTPUT_PORTS 8
194 #define USE_DSHOT
195 #define USE_ESC_SENSOR