Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / target / SPEEDYBEEF405WING / target.h
blob9da5b1158246a5878b1b878b58a5c30f75c9cc86
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 #define TARGET_BOARD_IDENTIFIER "SP4W"
21 #define USBD_PRODUCT_STRING "SpeedyBee F405 Wing"
23 // LEDs
24 #define LED0 PA14 //Blue
25 #define LED1 PA13 //Green
27 // Beeper
28 #define BEEPER PC15
29 #define BEEPER_INVERTED
32 * Buses
35 // SPI1
36 #define USE_SPI
37 #define USE_SPI_DEVICE_1
38 #define SPI1_SCK_PIN PA5
39 #define SPI1_MISO_PIN PA6
40 #define SPI1_MOSI_PIN PA7
42 // SPI2
43 #define USE_SPI_DEVICE_2
44 #define SPI2_SCK_PIN PB13
45 #define SPI2_MISO_PIN PC2
46 #define SPI2_MOSI_PIN PC3
48 // SPI3
49 #define USE_SPI_DEVICE_3
50 #define SPI3_SCK_PIN PB3
51 #define SPI3_MISO_PIN PB4
52 #define SPI3_MOSI_PIN PB5
54 // Serial ports
55 #define USE_VCP
57 #define USE_UART1
58 #define UART1_TX_PIN PA9
59 #define UART1_RX_PIN PA10
61 #define USE_UART2
62 #define UART2_TX_PIN PA2
63 #define UART2_RX_PIN PA3
65 #define USE_UART3
66 #define UART3_TX_PIN PC10
67 #define UART3_RX_PIN PC11
69 #define USE_UART4
70 #define UART4_TX_PIN PA0
71 #define UART4_RX_PIN PA1
73 #define USE_UART5
74 #define UART5_TX_PIN PC12
75 #define UART5_RX_PIN PD2
77 #define USE_UART6
78 #define UART6_TX_PIN PC6
79 #define UART6_RX_PIN PC7
81 //Optional Softserial on UART2 TX Pin PA2
82 #define USE_SOFTSERIAL1
83 #define SOFTSERIAL_1_TX_PIN PA2
84 #define SOFTSERIAL_1_RX_PIN PA2
86 #define SERIAL_PORT_COUNT 8
89 * I2C
91 #define USE_I2C
92 #define USE_I2C_DEVICE_1
93 #define I2C1_SCL PB8
94 #define I2C1_SDA PB9
97 * Sensor drivers
100 // ICM42605/ICM42688P
101 #define USE_IMU_ICM42605
102 #define IMU_ICM42605_ALIGN CW270_DEG
103 #define ICM42605_CS_PIN PA4
104 #define ICM42605_SPI_BUS BUS_SPI1
106 // Baro
107 #define USE_BARO
108 #define BARO_I2C_BUS BUS_I2C1
109 #define USE_BARO_BMP280
110 #define USE_BARO_MS5611
111 #define USE_BARO_BMP085
112 #define USE_BARO_DPS310
113 #define USE_BARO_SPL06
115 //Mag
116 #define USE_MAG
117 #define MAG_I2C_BUS BUS_I2C1
118 #define USE_MAG_ALL
120 #define RANGEFINDER_I2C_BUS BUS_I2C1
121 #define PITOT_I2C_BUS BUS_I2C1
122 #define TEMPERATURE_I2C_BUS BUS_I2C1
124 // OSD
125 #define USE_MAX7456
126 #define MAX7456_CS_PIN PB12
127 #define MAX7456_SPI_BUS BUS_SPI2
129 // SD Card
130 #define USE_SDCARD
131 #define USE_SDCARD_SPI
132 #define SDCARD_SPI_BUS BUS_SPI3
133 #define SDCARD_CS_PIN PC14
135 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
137 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
138 #define SERIALRX_PROVIDER SERIALRX_CRSF
139 #define SERIALRX_UART SERIAL_PORT_USART1
141 // *************** ADC ***************************
142 #define USE_ADC
143 #define ADC_INSTANCE ADC1
144 #define ADC1_DMA_STREAM DMA2_Stream0
145 #define ADC_CHANNEL_1_PIN PC0
146 #define ADC_CHANNEL_2_PIN PC1
147 #define ADC_CHANNEL_3_PIN PC5
148 #define ADC_CHANNEL_4_PIN PC4
149 #define VBAT_ADC_CHANNEL ADC_CHN_1
150 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
151 #define RSSI_ADC_CHANNEL ADC_CHN_3
152 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
154 // *************** LED2812 ************************
155 #define USE_LED_STRIP
156 #define WS2811_PIN PA8
158 // *************** OTHERS *************************
159 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_BLACKBOX | FEATURE_AIRMODE)
160 #define CURRENT_METER_SCALE 195
162 #define USE_DSHOT
163 #define USE_ESC_SENSOR
164 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
166 #define TARGET_IO_PORTA 0xffff
167 #define TARGET_IO_PORTB 0xffff
168 #define TARGET_IO_PORTC 0xffff
169 #define TARGET_IO_PORTD (BIT(2))
171 #define MAX_PWM_OUTPUT_PORTS 11
173 #define USE_PINIO
174 #define USE_PINIOBOX
175 #define PINIO1_PIN PC13