Merge pull request #10558 from iNavFlight/MrD_Correct-comments-on-OSD-symbols
[inav.git] / src / main / target / SKYSTARSH743HD / target.h
blob6e830664c5d37466f0bbbf994a4c5525fd01bf51
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 "SSH7"
22 #define USBD_PRODUCT_STRING "SKYSTARSH743HD"
24 #define USE_TARGET_CONFIG
26 #define LED0 PE3
27 #define LED1 PE4
29 #define BEEPER PB3
30 #define BEEPER_INVERTED
32 // ************* DEVICES-SPI : IMU/OSD/FLASH***********
34 // ************************** IMU **************
35 #define USE_DUAL_GYRO
36 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
37 #define USE_IMU_BMI270
38 // *****IMU1 BMI270 ON SPI4 **************
39 #define IMU1_ALIGN CW0_DEG
40 #define IMU1_SPI_BUS BUS_SPI4
41 #define IMU1_CS_PIN PE11
42 // *****IMU2 BMI270 ON SPI1 **************
43 #define IMU2_ALIGN CW90_DEG
44 #define IMU2_SPI_BUS BUS_SPI1
45 #define IMU2_CS_PIN PC15
47 // *************** OSD MAX7456 ON SPI2************
48 #define USE_MAX7456
49 #define MAX7456_SPI_BUS BUS_SPI2
50 #define MAX7456_CS_PIN PB12
52 // *************** FLASH BLACKBOX ON SPI3*******************
53 #define USE_FLASHFS
54 #define USE_FLASH_M25P16
55 #define M25P16_CS_PIN PA15
56 #define M25P16_SPI_BUS BUS_SPI3
58 #define W25N01G_SPI_BUS BUS_SPI3
59 #define W25N01G_CS_PIN PA15
61 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
63 // *************** DEVICES-I2C :Baro/Mag/Temp ************
65 #define USE_BARO
66 #define BARO_I2C_BUS BUS_I2C2
67 #define USE_BARO_BMP280
68 #define USE_BARO_MS5611
69 #define USE_BARO_DPS310
70 #define USE_BARO_SPL06
72 #define USE_MAG
73 #define MAG_I2C_BUS BUS_I2C1
74 #define USE_MAG_ALL
76 #define TEMPERATURE_I2C_BUS BUS_I2C1
77 #define PITOT_I2C_BUS BUS_I2C1
79 #define USE_RANGEFINDER
80 #define RANGEFINDER_I2C_BUS BUS_I2C1
82 // *************** SPI BUS *******************************
83 #define USE_SPI
85 #define USE_SPI_DEVICE_1
86 #define SPI1_SCK_PIN PA5
87 #define SPI1_MISO_PIN PA6
88 #define SPI1_MOSI_PIN PD7
90 #define USE_SPI_DEVICE_2
91 #define SPI2_SCK_PIN PB13
92 #define SPI2_MISO_PIN PB14
93 #define SPI2_MOSI_PIN PB15
95 #define USE_SPI_DEVICE_3
96 #define SPI3_SCK_PIN PC10
97 #define SPI3_MISO_PIN PC11
98 #define SPI3_MOSI_PIN PC12
100 #define USE_SPI_DEVICE_4
101 #define SPI4_SCK_PIN PE12
102 #define SPI4_MISO_PIN PE13
103 #define SPI4_MOSI_PIN PE14
106 // *************** I2C BUS *******************************
107 #define USE_I2C
108 #define USE_I2C_DEVICE_1
109 #define I2C1_SCL PB8
110 #define I2C1_SDA PB9
112 #define USE_I2C_DEVICE_2
113 #define I2C2_SCL PB10
114 #define I2C2_SDA PB11
117 // *************** UART ***********************************
118 #define USE_VCP
120 #define USE_UART1
121 #define UART1_TX_PIN PA9
122 #define UART1_RX_PIN PA10
124 #define USE_UART2
125 #define UART2_TX_PIN PD5
126 #define UART2_RX_PIN PD6
128 #define USE_UART3
129 #define UART3_TX_PIN PD8
130 #define UART3_RX_PIN PD9
132 #define USE_UART4
133 #define UART4_TX_PIN PD1
134 #define UART4_RX_PIN PD0
136 #define USE_UART5
137 #define UART5_TX_PIN PB6
138 #define UART5_RX_PIN PB5
140 #define USE_UART6
141 #define UART6_TX_PIN PC6
142 #define UART6_RX_PIN PC7
144 #define USE_UART7
145 #define UART7_TX_PIN PE8
146 #define UART7_RX_PIN PE7
148 #define USE_UART8
149 #define UART8_TX_PIN PE1
150 #define UART8_RX_PIN PE0
152 #define SERIAL_PORT_COUNT 9
154 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
155 #define SERIALRX_PROVIDER SERIALRX_SBUS
156 #define SERIALRX_UART SERIAL_PORT_USART1
158 // *************** ADC *****************************
159 #define USE_ADC
160 #define ADC_INSTANCE ADC1
162 #define ADC_CHANNEL_1_PIN PC0 //ADC123 VBAT1
163 #define ADC_CHANNEL_2_PIN PC1 //ADC123 CURR1
164 #define ADC_CHANNEL_3_PIN PC3 //ADC12 RSSI
165 #define ADC_CHANNEL_4_PIN PC4 //ADC12 AirS
167 #define VBAT_ADC_CHANNEL ADC_CHN_1
168 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
169 #define RSSI_ADC_CHANNEL ADC_CHN_3
170 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
172 // *************** PINIO ***************************
173 #define USE_PINIO
174 #define USE_PINIOBOX
175 #define PINIO1_PIN PC5 // VTX power switcher
176 #define PINIO2_PIN PC2 // 2xCamera switcher
177 #define PINIO3_PIN PD11
179 // *************** LEDSTRIP ************************
180 #define USE_LED_STRIP
181 #define WS2811_PIN PA8
183 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
184 #define CURRENT_METER_SCALE 290
186 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
188 #define TARGET_IO_PORTA 0xffff
189 #define TARGET_IO_PORTB 0xffff
190 #define TARGET_IO_PORTC 0xffff
191 #define TARGET_IO_PORTD 0xffff
192 #define TARGET_IO_PORTE 0xffff
194 #define MAX_PWM_OUTPUT_PORTS 10
195 #define USE_DSHOT
196 #define USE_ESC_SENSOR