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 "F405AIO"
21 #define USBD_PRODUCT_STRING "AocodaRCF405AIO"
27 #define BEEPER_INVERTED
34 #define UART1_RX_PIN PA10
35 #define UART1_TX_PIN PA9
38 #define UART2_RX_PIN PA3
39 #define UART2_TX_PIN PA2
42 #define UART3_RX_PIN PC11
43 #define UART3_TX_PIN PC10
46 #define UART4_RX_PIN PA1
47 #define UART4_TX_PIN PA0
50 #define UART5_RX_PIN PC12
51 #define UART5_TX_PIN PD2
53 #define SERIAL_PORT_COUNT 6
56 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
59 #define USE_SPI_DEVICE_1
61 #define SPI1_SCK_PIN PA5
62 #define SPI1_MISO_PIN PA6
63 #define SPI1_MOSI_PIN PA7
65 #define USE_IMU_MPU6500
66 #define MPU6500_CS_PIN PA4
67 #define MPU6500_SPI_BUS BUS_SPI1
68 #define MPU6500_EXTI_PIN PC5
69 #define IMU_MPU6500_ALIGN CW90_DEG
71 #define USE_IMU_MPU6000
72 #define MPU6000_CS_PIN PA4
73 #define MPU6000_SPI_BUS BUS_SPI1
74 #define MPU6000_EXTI_PIN PC5
75 #define IMU_MPU6000_ALIGN CW90_DEG
77 #define USE_IMU_BMI270
78 #define BMI270_CS_PIN PA4
79 #define BMI270_SPI_BUS BUS_SPI1
80 #define BMI270_EXTI_PIN PC5
81 #define IMU_BMI270_ALIGN CW90_DEG
83 /*** I2C (Baro & Mag) ***/
86 #define USE_I2C_DEVICE_1
92 #define USE_BARO_BMP280
93 #define USE_BARO_MS5611
94 #define USE_BARO_DPS310
95 #define USE_BARO_SPL06
96 #define BARO_I2C_BUS BUS_I2C1
100 #define MAG_I2C_BUS BUS_I2C1
103 /*** Onboard Flash ***/
104 #define USE_SPI_DEVICE_3
105 #define SPI3_SCK_PIN PB3
106 #define SPI3_MISO_PIN PB5
107 #define SPI3_MOSI_PIN PB4
109 #define M25P16_SPI_BUS BUS_SPI3
110 #define M25P16_CS_PIN PC0
113 #define USE_FLASH_M25P16
114 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
118 #define USE_SPI_DEVICE_2
119 #define SPI2_SCK_PIN PB13
120 #define SPI2_MISO_PIN PB14
121 #define SPI2_MOSI_PIN PB15
124 #define MAX7456_SPI_BUS BUS_SPI2
125 #define MAX7456_CS_PIN PA13
129 #define ADC_CHANNEL_1_PIN PC2
130 #define ADC_CHANNEL_2_PIN PC3
131 #define ADC_CHANNEL_3_PIN PC1
133 #define VBAT_ADC_CHANNEL ADC_CHN_1
134 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
135 #define RSSI_ADC_CHANNEL ADC_CHN_2
138 #define USE_LED_STRIP
139 #define WS2811_PIN PB1
141 /*** Default settings ***/
142 #define SERIALRX_UART SERIAL_PORT_USART2
143 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
144 #define SERIALRX_PROVIDER SERIALRX_CRSF
145 #define CURRENT_METER_SCALE 589
146 #define CURRENT_METER_OFFSET -204
148 /*** Optical Flow & Lidar ***/
149 #define USE_RANGEFINDER
150 #define USE_RANGEFINDER_MSP
152 #define USE_OPFLOW_MSP
154 /*** Timer/PWM output ***/
155 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
156 #define MAX_PWM_OUTPUT_PORTS 8
158 #define USE_ESC_SENSOR
161 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
163 #define TARGET_IO_PORTA 0xffff
164 #define TARGET_IO_PORTB 0xffff
165 #define TARGET_IO_PORTC 0xffff
166 #define TARGET_IO_PORTD (BIT(2))