Merge pull request #10558 from iNavFlight/MrD_Correct-comments-on-OSD-symbols
[inav.git] / src / main / target / SPEEDYBEEF7V2 / target.h
blob9dfcdf232b859e72ada25daabae48f5f621e1218
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #define TARGET_BOARD_IDENTIFIER "SB72"
24 #define USBD_PRODUCT_STRING "SpeedyBeeF7V2"
25 #define USE_TARGET_CONFIG
27 #define LED0 PC13
29 // *************** UART *****************************
30 #define USB_IO
31 #define USE_VCP
32 #define VBUS_SENSING_PIN PC15
33 #define VBUS_SENSING_ENABLED
35 #define USE_UART1
36 #define UART1_RX_PIN PB7
37 #define UART1_TX_PIN PB6
39 #define USE_UART2
40 #define UART2_RX_PIN PA3
41 #define UART2_TX_PIN PA2
43 #define USE_UART3
44 #define UART3_RX_PIN PC11
45 #define UART3_TX_PIN PC10
47 #define USE_UART4
48 #define UART4_RX_PIN PA1
49 #define UART4_TX_PIN PA0
51 #define USE_UART5
52 #define UART5_RX_PIN PD2
53 #define UART5_TX_PIN PC12
55 #define USE_UART6
56 #define UART6_RX_PIN PC7
57 #define UART6_TX_PIN PC6
59 #define SERIAL_PORT_COUNT 7
61 // *************** Gyro & ACC **********************
62 #define USE_IMU_MPU6000
63 #define IMU_MPU6000_ALIGN CW0_DEG
65 #define USE_SPI
66 #define USE_SPI_DEVICE_1
68 #define SPI1_SCK_PIN PA5
69 #define SPI1_MISO_PIN PA6
70 #define SPI1_MOSI_PIN PA7
72 #define MPU6000_CS_PIN PA4
73 #define MPU6000_SPI_BUS BUS_SPI1
75 #define USE_BEEPER
76 #define BEEPER PB2
77 #define BEEPER_INVERTED
79 // *************** I2C(Baro & I2C) **************************
80 #define USE_I2C
82 #define USE_I2C_DEVICE_1
83 #define I2C1_SCL PB8
84 #define I2C1_SDA PB9
86 #define USE_I2C_DEVICE_2
87 #define I2C2_SCL PB10
88 #define I2C2_SDA PB11
90 // Baro
91 #define USE_BARO
92 #define USE_BARO_BMP280
93 #define USE_BARO_DPS310
94 #define BARO_I2C_BUS BUS_I2C1
96 // Mag
97 #define USE_MAG
98 #define USE_MAG_ALL
99 #define MAG_I2C_BUS BUS_I2C2
101 // *************** Flash **************************
102 #define USE_SPI_DEVICE_3
103 #define SPI3_SCK_PIN PB3
104 #define SPI3_MISO_PIN PB4
105 #define SPI3_MOSI_PIN PB5
107 #define USE_FLASHFS
108 #define USE_FLASH_M25P16
109 #define M25P16_CS_PIN PA14
110 #define M25P16_SPI_BUS BUS_SPI3
111 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
113 // *************** OSD *****************************
114 #define USE_OSD
115 #define USE_SPI_DEVICE_2
116 #define SPI2_SCK_PIN PB13
117 #define SPI2_MISO_PIN PB14
118 #define SPI2_MOSI_PIN PB15
120 #define USE_MAX7456
121 #define MAX7456_SPI_BUS BUS_SPI2
122 #define MAX7456_CS_PIN PB12
124 // *************** ADC *****************************
125 #define USE_ADC
126 #define ADC_CHANNEL_1_PIN PC2
127 #define ADC_CHANNEL_2_PIN PC1
128 #define ADC_CHANNEL_3_PIN PC3
130 #define VBAT_ADC_CHANNEL ADC_CHN_1
131 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
132 #define RSSI_ADC_CHANNEL ADC_CHN_3
134 // *************** LED *****************************
135 #define USE_LED_STRIP
136 #define WS2811_PIN PB0
138 // ********** Optiical Flow adn Lidar **************
139 #define USE_RANGEFINDER
140 #define USE_RANGEFINDER_MSP
141 #define USE_OPFLOW
142 #define USE_OPFLOW_MSP
146 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
147 #define USE_DSHOT
148 #define USE_ESC_SENSOR
149 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
150 #define USE_SERIALSHOT
152 #define SERIALRX_UART SERIAL_PORT_USART1
153 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
154 #define SERIALRX_PROVIDER SERIALRX_SBUS
156 #define MAX_PWM_OUTPUT_PORTS 4
158 #define CURRENT_METER_SCALE 102
160 #define USE_PINIO
161 #define USE_PINIOBOX
162 #define PINIO1_PIN PA15
163 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
165 #define TARGET_IO_PORTA 0xffff
166 #define TARGET_IO_PORTB 0xffff
167 #define TARGET_IO_PORTC 0xffff
168 #define TARGET_IO_PORTD (BIT(2))