2 * This file is part of Cleanflight.
4 * Cleanflight 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 * Cleanflight 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>.
20 #define TARGET_BOARD_IDENTIFIER "MINI"
22 #define USBD_PRODUCT_STRING "MICOAIR405MINI"
24 // *************** LED **********************
29 // *************** SPI: Gyro & ACC & BARO & OSD & SDCARD **********************
31 #define USE_SPI_DEVICE_1
32 #define USE_SPI_DEVICE_2
33 #define USE_SPI_DEVICE_3
35 #define SPI1_SCK_PIN PA5
36 #define SPI1_MISO_PIN PA6
37 #define SPI1_MOSI_PIN PA7
39 #define SPI2_SCK_PIN PB13
40 #define SPI2_MISO_PIN PC2
41 #define SPI2_MOSI_PIN PC3
43 #define SPI3_SCK_PIN PC10
44 #define SPI3_MISO_PIN PC11
45 #define SPI3_MOSI_PIN PC12
47 #define USE_IMU_BMI270
48 #define IMU_BMI270_ALIGN CW0_DEG
49 #define BMI270_SPI_BUS BUS_SPI2
50 #define BMI270_CS_PIN PC14
53 #define USE_BARO_DPS310
54 #define DPS310_SPI_BUS BUS_SPI2
55 #define DPS310_CS_PIN PC13
58 #define MAX7456_SPI_BUS BUS_SPI1
59 #define MAX7456_CS_PIN PB12
63 #define USE_SDCARD_SPI
64 #define SDCARD_SPI_BUS BUS_SPI3
65 #define SDCARD_CS_PIN PC9
66 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
68 // *************** UART *****************************
72 #define UART1_RX_PIN PA10
73 #define UART1_TX_PIN PA9
76 #define UART2_RX_PIN PA3
77 #define UART2_TX_PIN PA2
80 #define UART3_RX_PIN PB11
81 #define UART3_TX_PIN PB10
84 #define UART4_RX_PIN PA1
85 #define UART4_TX_PIN PA0
88 #define UART5_RX_PIN PD2
89 #define UART5_TX_PIN NONE
92 #define UART6_RX_PIN PC7
93 #define UART6_TX_PIN PC6
94 #define INVERTER_PIN_UART6_RX PC15
96 #define SERIAL_PORT_COUNT 7 //VCP, UART1, UART2, UART3, UART4, UART5, UART6
98 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
99 #define SERIALRX_PROVIDER SERIALRX_SBUS
100 #define SERIALRX_UART SERIAL_PORT_USART6
101 #define USE_UART_INVERTER
103 // *************** I2C ****************************
105 #define USE_I2C_DEVICE_1
108 #define DEFAULT_I2C_BUS BUS_I2C1
111 #define MAG_I2C_BUS DEFAULT_I2C_BUS
114 // *************** ENABLE OPTICAL FLOW & RANGEFINDER *****************************
115 #define USE_RANGEFINDER
116 #define USE_RANGEFINDER_MSP
118 #define USE_OPFLOW_MSP
120 // *************** ADC *****************************
122 #define ADC_INSTANCE ADC1
123 #define ADC1_DMA_STREAM DMA2_Stream0
124 #define ADC_CHANNEL_1_PIN PC0
125 #define ADC_CHANNEL_2_PIN PC1
126 #define VBAT_ADC_CHANNEL ADC_CHN_1
127 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
128 #define VBAT_SCALE_DEFAULT 2121
129 #define CURRENT_METER_SCALE 402
131 #define DEFAULT_FEATURES (FEATURE_VBAT | FEATURE_CURRENT_METER | FEATURE_OSD | FEATURE_TELEMETRY)
134 #define USE_ESC_SENSOR
135 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
137 #define TARGET_IO_PORTA 0xffff
138 #define TARGET_IO_PORTB 0xffff
139 #define TARGET_IO_PORTC 0xffff
140 #define TARGET_IO_PORTD (BIT(2))
142 #define MAX_PWM_OUTPUT_PORTS 9