Merge pull request #10492 from iNavFlight/MrD_Update-OSD.md-for-8.0
[inav.git] / src / main / target / RUSH_BLADE_F7 / target.h
blob2e68f1a392b10e691a2f1b53c674e3055aa5d417
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/>.
18 #pragma once
20 #ifdef RUSH_BLADE_F7
21 #define TARGET_BOARD_IDENTIFIER "RBF7"
22 #define USBD_PRODUCT_STRING "RUSH_BLADE_F7"
23 #endif
25 #ifdef RUSH_BLADE_F7_HD
26 #define TARGET_BOARD_IDENTIFIER "RBF7HD"
27 #define USBD_PRODUCT_STRING "RUSH_BLADE_F7_HD"
28 #endif
30 #define LED0 PB10
31 #define BEEPER PB2
32 #define BEEPER_INVERTED
34 // *************** SPI **********************
35 #define USE_SPI
37 #define USE_SPI_DEVICE_1
38 #define SPI1_NSS_PIN PC4
39 #define SPI1_SCK_PIN PA5
40 #define SPI1_MISO_PIN PA6
41 #define SPI1_MOSI_PIN PA7
43 #define USE_SPI_DEVICE_2
44 #define SPI2_NSS_FLASH_PIN PB12
45 #define SPI2_NSS_OSD_PIN PB11
46 #define SPI2_SCK_PIN PB13
47 #define SPI2_MISO_PIN PB14
48 #define SPI2_MOSI_PIN PB15
51 // *************** Gyro & ACC **********************
52 #define USE_IMU_MPU6000
53 #define IMU_MPU6000_ALIGN CW270_DEG
54 #define MPU6000_SPI_BUS BUS_SPI1
55 #define MPU6000_CS_PIN SPI1_NSS_PIN
57 #define USE_IMU_ICM42605
58 #define IMU_ICM42605_ALIGN CW270_DEG
59 #define ICM42605_SPI_BUS BUS_SPI1
60 #define ICM42605_CS_PIN SPI1_NSS_PIN
62 // *************** I2C/Baro/Mag *********************
63 #define USE_I2C
65 #define USE_I2C_DEVICE_1
66 #define I2C1_SCL PB8
67 #define I2C1_SDA PB9
69 #define USE_BARO
70 #define BARO_I2C_BUS BUS_I2C1
71 #define USE_BARO_BMP280
72 #define USE_BARO_MS5611
73 #define USE_BARO_SPL06
74 #define USE_BARO_DPS310
76 #define USE_MAG
77 #define MAG_I2C_BUS BUS_I2C1
78 #define USE_MAG_ALL
81 // *************** Flash ****************************
82 #define USE_FLASHFS
83 #define USE_FLASH_M25P16
84 #define M25P16_SPI_BUS BUS_SPI2
85 #define M25P16_CS_PIN SPI2_NSS_FLASH_PIN
86 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
89 // *************** Analog OSD ************************
90 #ifdef RUSH_BLADE_F7
91 #define USE_MAX7456
92 #define MAX7456_SPI_BUS BUS_SPI2
93 #define MAX7456_CS_PIN SPI2_NSS_OSD_PIN
94 #endif
96 // *************** UART *****************************
97 #define USE_VCP
99 #define USE_UART1
100 #define UART1_TX_PIN PA9
101 #define UART1_RX_PIN PA10
103 #define USE_UART2
104 #define UART2_TX_PIN PA2
105 #define UART2_RX_PIN PA3
107 #define USE_UART3
108 #define UART3_TX_PIN PC10
109 #define UART3_RX_PIN PC11
111 #define USE_UART4
112 #define UART4_TX_PIN PA0
113 #define UART4_RX_PIN PA1
115 #define USE_UART5
116 #define UART5_TX_PIN PC12
117 #define UART5_RX_PIN PD2
119 #define SERIAL_PORT_COUNT 6
121 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
122 #define SERIALRX_PROVIDER SERIALRX_SBUS
124 // *************** ADC *****************************
125 #define USE_ADC
126 #define ADC_INSTANCE ADC1
127 #define ADC1_DMA_STREAM DMA2_Stream4
129 #define ADC_CHANNEL_1_PIN PC0
130 #define ADC_CHANNEL_2_PIN PC1
132 #define VBAT_ADC_CHANNEL ADC_CHN_1
133 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
135 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_LED_STRIP)
137 #define CURRENT_METER_SCALE 179
140 // ********** Optiical Flow and Lidar **************
141 #define USE_RANGEFINDER
142 #define USE_RANGEFINDER_MSP
143 #define USE_OPFLOW
144 #define USE_OPFLOW_MSP
146 // *************** LED *****************************
147 #define USE_LED_STRIP
148 #define WS2811_PIN PA15
150 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
152 #define TARGET_IO_PORTA 0xffff
153 #define TARGET_IO_PORTB 0xffff
154 #define TARGET_IO_PORTC 0xffff
155 #define TARGET_IO_PORTD (BIT(2))
157 #define MAX_PWM_OUTPUT_PORTS 8
158 #define USE_DSHOT
159 #define USE_ESC_SENSOR