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 #if defined(MATEKF722MINI)
22 # define TARGET_BOARD_IDENTIFIER "MF7M"
23 # define USBD_PRODUCT_STRING "MatekF722Mini"
25 # define TARGET_BOARD_IDENTIFIER "MF7S"
26 # define USBD_PRODUCT_STRING "MatekF722SE"
29 #define LED0 PA14 //Blue SWCLK
30 #define LED1 PA13 //Green SWDIO
33 #define BEEPER_INVERTED
35 // *************** SPI1 Gyro & ACC *******************
36 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
39 #define USE_SPI_DEVICE_1
40 #define SPI1_SCK_PIN PA5
41 #define SPI1_MISO_PIN PA6
42 #define SPI1_MOSI_PIN PA7
46 #define USE_IMU_MPU6000
47 #define IMU_MPU6000_ALIGN CW180_DEG_FLIP
48 #define MPU6000_CS_PIN PB2
49 #define MPU6000_SPI_BUS BUS_SPI1
50 #define MPU6000_EXTI_PIN PC4
52 #define USE_IMU_MPU6500
53 #define IMU_MPU6500_ALIGN CW90_DEG
54 #define MPU6500_CS_PIN PC15
55 #define MPU6500_SPI_BUS BUS_SPI1
56 #define MPU6500_EXTI_PIN PC3
61 #define USE_MPU_DATA_READY_SIGNAL
63 // *************** I2C /Baro/Mag *********************
65 #define USE_I2C_DEVICE_1
70 #define BARO_I2C_BUS BUS_I2C1
71 #define USE_BARO_BMP280
72 #define USE_BARO_MS5611
73 #define USE_BARO_DPS310
74 #define USE_BARO_SPL06
77 #define MAG_I2C_BUS BUS_I2C1
78 #define USE_MAG_AK8975
79 #define USE_MAG_HMC5883
80 #define USE_MAG_QMC5883
81 #define USE_MAG_IST8310
82 #define USE_MAG_IST8308
83 #define USE_MAG_MAG3110
84 #define USE_MAG_LIS3MDL
86 #define TEMPERATURE_I2C_BUS BUS_I2C1
88 #define PITOT_I2C_BUS BUS_I2C1
90 #define USE_RANGEFINDER
91 #define RANGEFINDER_I2C_BUS BUS_I2C1
93 // *************** SPI2 OSD ***********************
94 #define USE_SPI_DEVICE_2
95 #define SPI2_SCK_PIN PB13
96 #define SPI2_MISO_PIN PB14
97 #define SPI2_MOSI_PIN PB15
100 #define MAX7456_SPI_BUS BUS_SPI2
101 #define MAX7456_CS_PIN PB12
103 // *************** SPI3 SD BLACKBOX*******************
104 #define USE_SPI_DEVICE_3
105 #define SPI3_SCK_PIN PC10
106 #define SPI3_MISO_PIN PC11
107 #define SPI3_MOSI_PIN PC12
109 #if defined(MATEKF722MINI)
111 # define USE_FLASH_M25P16
112 # define M25P16_SPI_BUS BUS_SPI3
113 # define M25P16_CS_PIN PD2
114 # define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
117 # define USE_SDCARD_SPI
118 # define SDCARD_SPI_BUS BUS_SPI3
119 # define SDCARD_CS_PIN PD2
120 # define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
123 // *************** UART *****************************
125 #define USB_DETECT_PIN PC14
126 #define USE_USB_DETECT
129 #define UART1_TX_PIN PA9
130 #define UART1_RX_PIN PA10
133 #define UART2_TX_PIN PA2
134 #define UART2_RX_PIN PA3
137 #define UART3_TX_PIN PB10
138 #define UART3_RX_PIN PB11
141 #define UART4_TX_PIN PA0
142 #define UART4_RX_PIN PA1
145 #define UART6_TX_PIN PC6
146 #define UART6_RX_PIN PC7
148 #define USE_SOFTSERIAL1
149 #define SOFTSERIAL_1_TX_PIN PA2
150 #define SOFTSERIAL_1_RX_PIN PA2
152 #define SERIAL_PORT_COUNT 7
154 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
155 #define SERIALRX_PROVIDER SERIALRX_SBUS
156 #define SERIALRX_UART SERIAL_PORT_USART2
158 // *************** ADC *****************************
160 #define ADC_INSTANCE ADC1
161 #define ADC1_DMA_STREAM DMA2_Stream0
163 #define ADC_CHANNEL_1_PIN PC2
164 #define ADC_CHANNEL_2_PIN PC1
165 #define ADC_CHANNEL_3_PIN PC0
166 #define ADC_CHANNEL_4_PIN PA4
168 #define VBAT_ADC_CHANNEL ADC_CHN_1
169 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
170 #define RSSI_ADC_CHANNEL ADC_CHN_3
171 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
173 // *************** PINIO ***************************
176 #define PINIO1_PIN PC8 // VTX power switcher
177 #define PINIO2_PIN PC9 // 2xCamera switcher
179 // *************** LEDSTRIP ************************
180 #define USE_LED_STRIP
181 #define WS2811_PIN PA8
183 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
184 #define CURRENT_METER_SCALE 179
186 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
188 #define TARGET_IO_PORTA 0xffff
189 #define TARGET_IO_PORTB 0xffff
190 #define TARGET_IO_PORTC 0xffff
191 #define TARGET_IO_PORTD 0xffff
193 #define MAX_PWM_OUTPUT_PORTS 8
195 #define USE_ESC_SENSOR
197 #define BNO055_I2C_BUS BUS_I2C1