2 * This file is part of INAV Project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
6 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * Alternatively, the contents of this file may be used under the terms
9 * of the GNU General Public License Version 3, as described below:
11 * This file is free software: you may copy, redistribute and/or modify
12 * it under the terms of the GNU General Public License as published by the
13 * Free Software Foundation, either version 3 of the License, or (at your
14 * option) any later version.
16 * This file is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
19 * Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see http://www.gnu.org/licenses/.
27 #define TARGET_BOARD_IDENTIFIER "SB44"
28 #define USBD_PRODUCT_STRING "SpeedyBeeF405V4"
31 #define LED0 PC13 //Blue
34 #define BEEPER_INVERTED
38 #define PINIO1_PIN PB11
39 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
41 // *************** UART *****************************
45 #define UART1_TX_PIN PA9
46 #define UART1_RX_PIN PA10
49 #define UART2_TX_PIN PA2
50 #define UART2_RX_PIN PA3
53 #define UART3_TX_PIN PC10
54 #define UART3_RX_PIN PC11
56 // Internally routed to Bluetooth
58 #define UART4_TX_PIN PA0
59 #define UART4_RX_PIN PA1
62 #define UART5_TX_PIN PC12 // Not broken out
63 #define UART5_RX_PIN PD2 //ESC TLM
66 #define UART6_TX_PIN PC6
67 #define UART6_RX_PIN PC7
69 #define USE_SOFTSERIAL1
70 #define SOFTSERIAL_1_TX_PIN PA2
71 #define SOFTSERIAL_1_RX_PIN PA2
73 #define SERIAL_PORT_COUNT 8
75 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
76 #define SERIALRX_PROVIDER SERIALRX_SBUS
77 #define SERIALRX_UART SERIAL_PORT_USART2
79 // *************** Gyro & ACC **********************
80 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
83 #define USE_SPI_DEVICE_1
84 #define SPI1_SCK_PIN PA5
85 #define SPI1_MISO_PIN PA6
86 #define SPI1_MOSI_PIN PA7
88 #define USE_IMU_ICM42605
89 #define IMU_ICM42605_ALIGN CW90_DEG
90 #define ICM42605_CS_PIN PA4
91 #define ICM42605_SPI_BUS BUS_SPI1
93 // *************** I2C(Baro & I2C) **************************
95 #define USE_I2C_DEVICE_1
100 #define BARO_I2C_BUS BUS_I2C1
101 #define USE_BARO_BMP280
102 #define USE_BARO_MS5611
103 #define USE_BARO_BMP085
104 #define USE_BARO_DPS310
105 #define USE_BARO_SPL06
108 #define MAG_I2C_BUS BUS_I2C1
111 #define USE_RANGEFINDER
112 #define TEMPERATURE_I2C_BUS BUS_I2C1
113 #define PITOT_I2C_BUS BUS_I2C1
114 #define RANGEFINDER_I2C_BUS BUS_I2C1
116 // *************** Internal SD card **************************
117 #define USE_SPI_DEVICE_3
118 #define SPI3_SCK_PIN PB3
119 #define SPI3_MISO_PIN PB4
120 #define SPI3_MOSI_PIN PB5
123 #define USE_SDCARD_SPI
124 #define SDCARD_SPI_BUS BUS_SPI3
125 #define SDCARD_CS_PIN PC14
127 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
129 // *************** OSD *****************************
130 #define USE_SPI_DEVICE_2
131 #define SPI2_SCK_PIN PB13
132 #define SPI2_MISO_PIN PC2
133 #define SPI2_MOSI_PIN PC3
137 #define MAX7456_SPI_BUS BUS_SPI2
138 #define MAX7456_CS_PIN PB12
140 // *************** ADC *****************************
143 #define ADC_CHANNEL_1_PIN PC0
144 #define ADC_CHANNEL_2_PIN PC1
145 #define ADC_CHANNEL_3_PIN PC5
147 #define VBAT_ADC_CHANNEL ADC_CHN_1
148 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
149 #define RSSI_ADC_CHANNEL ADC_CHN_3
151 // *************** LED *****************************
152 #define USE_LED_STRIP
153 #define WS2811_PIN PA8
155 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_BLACKBOX | FEATURE_TELEMETRY)
156 #define CURRENT_METER_SCALE 400
159 #define USE_SERIALSHOT
160 #define USE_ESC_SENSOR
161 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
163 #define MAX_PWM_OUTPUT_PORTS 10
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))