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/>.
21 #define TARGET_BOARD_IDENTIFIER "F4PR"
22 #define USBD_PRODUCT_STRING "FLYWOOF405PRO"
24 #define TARGET_BOARD_IDENTIFIER "F4HD"
25 #define USBD_PRODUCT_STRING "FLYWOOF405HD"
28 #define LED0 PC14 //Green
30 #define BEEPER_INVERTED
32 // *************** SPI1 Gyro & ACC *******************
34 #define USE_SPI_DEVICE_1
36 #define SPI1_SCK_PIN PA5
37 #define SPI1_MISO_PIN PA6
38 #define SPI1_MOSI_PIN PA7
40 #define USE_IMU_MPU6000
41 #define IMU_MPU6000_ALIGN CW90_DEG
42 #define MPU6000_CS_PIN PB12
43 #define MPU6000_SPI_BUS BUS_SPI1
45 #define USE_IMU_BMI270
46 #define IMU_BMI270_ALIGN CW180_DEG_FLIP
47 #define BMI270_CS_PIN PB12
48 #define BMI270_SPI_BUS BUS_SPI1
50 #define USE_IMU_ICM42605
51 #define IMU_ICM42605_ALIGN CW180_DEG_FLIP
52 #define ICM42605_CS_PIN PB12
53 #define ICM42605_SPI_BUS BUS_SPI1
56 #define GYRO_INT_EXTI PB13
57 #define USE_MPU_DATA_READY_SIGNAL
59 // *************** I2C /Baro/Mag *********************
61 #define USE_I2C_DEVICE_1
66 #define BARO_I2C_BUS BUS_I2C1
67 #define USE_BARO_BMP280
68 #define USE_BARO_MS5611
69 #define USE_BARO_BMP085
70 #define USE_BARO_DPS310
71 #define USE_BARO_SPL06
74 #define MAG_I2C_BUS BUS_I2C1
77 #define USE_RANGEFINDER
78 #define USE_RANGEFINDER_HCSR04_I2C
79 #define RANGEFINDER_I2C_BUS BUS_I2C1
80 #define PITOT_I2C_BUS BUS_I2C1
81 #define TEMPERATURE_I2C_BUS BUS_I2C1
85 // *************** SPI2 OSD ***************************
86 #define USE_SPI_DEVICE_3
87 #define SPI3_SCK_PIN PC10
88 #define SPI3_MISO_PIN PC11
89 #define SPI3_MOSI_PIN PC12
94 #define MAX7456_SPI_BUS BUS_SPI3
95 #define MAX7456_CS_PIN PB14
97 // *************** Onboard flash ********************
100 #define USE_FLASH_M25P16
101 #define M25P16_CS_PIN PB3
102 #define M25P16_SPI_BUS BUS_SPI3
104 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
107 // *************** UART *****************************
110 #define VBUS_SENSING_PIN PA8
111 #define VBUS_SENSING_ENABLED
114 #define UART1_TX_PIN PB6
115 #define UART1_RX_PIN PA10
118 #define UART2_TX_PIN PD5
119 #define UART2_RX_PIN PD6
122 #define UART3_TX_PIN PB10
123 #define UART3_RX_PIN PB11
126 #define UART4_TX_PIN PA0
127 #define UART4_RX_PIN PA1
130 #define UART5_TX_PIN NONE
131 #define UART5_RX_PIN PD2
134 #define UART6_TX_PIN PC6
135 #define UART6_RX_PIN PC7
137 #define SERIAL_PORT_COUNT 7
139 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
140 #define SERIALRX_PROVIDER SERIALRX_SBUS
141 #define SERIALRX_UART SERIAL_PORT_USART3
144 // *************** ADC ***************************
146 #define ADC_INSTANCE ADC1
147 #define ADC1_DMA_STREAM DMA2_Stream0
148 #define ADC_CHANNEL_1_PIN PC3
149 #define ADC_CHANNEL_2_PIN PC2
150 #define ADC_CHANNEL_3_PIN PC0
151 #define VBAT_ADC_CHANNEL ADC_CHN_1
152 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
153 #define RSSI_ADC_CHANNEL ADC_CHN_3
155 // *************** LED2812 ************************
156 #define USE_LED_STRIP
157 #define WS2811_PIN PA9
159 // *************** OTHERS *************************
160 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_SOFTSERIAL)
161 #define CURRENT_METER_SCALE 250
164 #define USE_ESC_SENSOR
166 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
168 #define TARGET_IO_PORTA 0xffff
169 #define TARGET_IO_PORTB 0xffff
170 #define TARGET_IO_PORTC 0xffff
171 #define TARGET_IO_PORTD 0xffff
173 #define MAX_PWM_OUTPUT_PORTS 8