add SPL06 in Matek targets
[inav/snaewe.git] / src / main / target / RUSH_BLADE_F7 / target.h
blobfb9c522642d87e3143f08cc33cd804e833636889
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 "RBF7"
22 #define USBD_PRODUCT_STRING "RUSH_BLADE_F7"
24 #define LED0 PB10 //Blue SWCLK
25 // #define LED1 PA13 //Green SWDIO
27 #define BEEPER PB2
28 #define BEEPER_INVERTED
30 // *************** SPI1 Gyro & ACC *******************
31 #define USE_SPI
32 #define USE_SPI_DEVICE_1
33 #define SPI1_SCK_PIN PA5
34 #define SPI1_MISO_PIN PA6
35 #define SPI1_MOSI_PIN PA7
37 #define USE_EXTI
38 #define USE_MPU_DATA_READY_SIGNAL
39 #define GYRO_INT_EXTI PA4
41 #define USE_IMU_MPU6000
42 #define IMU_MPU6000_ALIGN CW270_DEG
43 #define MPU6000_CS_PIN PC4
44 #define MPU6000_SPI_BUS BUS_SPI1
46 // *************** I2C /Baro/Mag *********************
47 #define USE_I2C
48 #define USE_I2C_DEVICE_1
49 #define I2C1_SCL PB8
50 #define I2C1_SDA PB9
52 #define USE_BARO
53 #define BARO_I2C_BUS BUS_I2C1
54 #define USE_BARO_BMP280
55 #define USE_BARO_MS5611
56 #define USE_BARO_DPS310
58 #define USE_MAG
59 #define MAG_I2C_BUS BUS_I2C1
60 #define USE_MAG_AK8975
61 #define USE_MAG_HMC5883
62 #define USE_MAG_QMC5883
63 #define USE_MAG_IST8310
64 #define USE_MAG_IST8308
65 #define USE_MAG_MAG3110
66 #define USE_MAG_LIS3MDL
68 #define TEMPERATURE_I2C_BUS BUS_I2C1
69 #define BNO055_I2C_BUS BUS_I2C1
70 #define PITOT_I2C_BUS BUS_I2C1
72 #define USE_RANGEFINDER
73 #define RANGEFINDER_I2C_BUS BUS_I2C1
75 // *************** SPI2 Flash ***********************
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_FLASHFS
82 #define USE_FLASH_M25P16
83 #define M25P16_SPI_BUS BUS_SPI2
84 #define M25P16_CS_PIN PB12
85 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
87 // *************** UART *****************************
88 #define USE_VCP
89 #define USB_DETECT_PIN PC14
90 #define USE_USB_DETECT
92 #define USE_UART1
93 #define UART1_TX_PIN PA9
94 #define UART1_RX_PIN PA10
96 #define USE_UART2
97 #define UART2_TX_PIN PA2
98 #define UART2_RX_PIN PA3
100 #define USE_UART3
101 #define UART3_TX_PIN PC10
102 #define UART3_RX_PIN PC11
104 #define USE_UART4
105 #define UART4_TX_PIN PA0
106 #define UART4_RX_PIN PA1
108 #define USE_UART5
109 #define UART5_TX_PIN PC12
110 #define UART5_RX_PIN PD2
112 #define SERIAL_PORT_COUNT 6
114 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
115 #define SERIALRX_PROVIDER SERIALRX_SBUS
116 #define SERIALRX_UART SERIAL_PORT_USART2
118 // *************** ADC *****************************
119 #define USE_ADC
120 #define ADC_INSTANCE ADC1
121 #define ADC1_DMA_STREAM DMA2_Stream0
123 #define ADC_CHANNEL_1_PIN PC0
124 #define ADC_CHANNEL_2_PIN PC1
126 #define VBAT_ADC_CHANNEL ADC_CHN_1
127 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
129 // *************** LEDSTRIP ************************
130 #define USE_LED_STRIP
131 #define WS2811_PIN PA8
133 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL)
134 #define CURRENT_METER_SCALE 179
136 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
138 #define TARGET_IO_PORTA 0xffff
139 #define TARGET_IO_PORTB 0xffff
140 #define TARGET_IO_PORTC 0xffff
141 #define TARGET_IO_PORTD 0xffff
143 #define MAX_PWM_OUTPUT_PORTS 10
144 #define USE_DSHOT
145 #define USE_ESC_SENSOR