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/>.
20 #define TARGET_BOARD_IDENTIFIER "SP4W"
21 #define USBD_PRODUCT_STRING "SpeedyBee F405 Wing"
24 #define LED0 PA14 //Blue
25 #define LED1 PA13 //Green
29 #define BEEPER_INVERTED
37 #define USE_SPI_DEVICE_1
38 #define SPI1_SCK_PIN PA5
39 #define SPI1_MISO_PIN PA6
40 #define SPI1_MOSI_PIN PA7
43 #define USE_SPI_DEVICE_2
44 #define SPI2_SCK_PIN PB13
45 #define SPI2_MISO_PIN PC2
46 #define SPI2_MOSI_PIN PC3
49 #define USE_SPI_DEVICE_3
50 #define SPI3_SCK_PIN PB3
51 #define SPI3_MISO_PIN PB4
52 #define SPI3_MOSI_PIN PB5
58 #define UART1_TX_PIN PA9
59 #define UART1_RX_PIN PA10
62 #define UART2_TX_PIN PA2
63 #define UART2_RX_PIN PA3
66 #define UART3_TX_PIN PC10
67 #define UART3_RX_PIN PC11
70 #define UART4_TX_PIN PA0
71 #define UART4_RX_PIN PA1
74 #define UART5_TX_PIN PC12
75 #define UART5_RX_PIN PD2
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
92 #define USE_I2C_DEVICE_1
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
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
117 #define MAG_I2C_BUS BUS_I2C1
120 #define RANGEFINDER_I2C_BUS BUS_I2C1
121 #define PITOT_I2C_BUS BUS_I2C1
122 #define TEMPERATURE_I2C_BUS BUS_I2C1
126 #define MAX7456_CS_PIN PB12
127 #define MAX7456_SPI_BUS BUS_SPI2
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 ***************************
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
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
175 #define PINIO1_PIN PC13