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 USE_TARGET_CONFIG
22 #define TARGET_BOARD_IDENTIFIER "M7X8"
23 #define USBD_PRODUCT_STRING "MAMBAF722_X8"
25 // ******** Board LEDs **********************
29 // ******* Beeper ***********
31 #define BEEPER_INVERTED
33 #define MPU6000_CS_PIN SPI1_NSS_PIN
34 #define MPU6000_SPI_BUS BUS_SPI1
36 #define USE_IMU_MPU6000
37 #define IMU_MPU6000_ALIGN CW180_DEG
41 #define USE_I2C_DEVICE_1
44 #define DEFAULT_I2C_BUS BUS_I2C1
47 // *************** Baro **************************
49 #define BARO_I2C_BUS DEFAULT_I2C_BUS
50 #define USE_BARO_BMP280
51 #define USE_BARO_MS5611
53 //*********** Magnetometer / Compass *************
55 #define MAG_I2C_BUS DEFAULT_I2C_BUS
57 #define USE_MAG_HMC5883
58 #define USE_MAG_QMC5883
59 #define USE_MAG_IST8310
60 #define USE_MAG_MAG3110
61 #define USE_MAG_LIS3MDL
63 // ******* SERIAL ********
72 #define UART1_TX_PIN PB6
73 #define UART1_RX_PIN PB7
75 #define UART2_TX_PIN PA2
76 #define UART2_RX_PIN PA3
78 #define UART3_TX_PIN PB10
79 #define UART3_RX_PIN PB11
81 #define UART4_TX_PIN PA0
82 #define UART4_RX_PIN PA1
84 #define UART5_TX_PIN PC12
85 #define UART5_RX_PIN PD2
87 #define UART6_TX_PIN PC6
88 #define UART6_RX_PIN PC7
90 #define SERIAL_PORT_COUNT 7
92 // ******* SPI ********
95 #define USE_SPI_DEVICE_1
96 #define SPI1_NSS_PIN PA4
97 #define SPI1_SCK_PIN PA5
98 #define SPI1_MISO_PIN PA6
99 #define SPI1_MOSI_PIN PA7
101 #define USE_SPI_DEVICE_2
102 #define SPI2_NSS_PIN PB12
103 #define SPI2_SCK_PIN PB13
104 #define SPI2_MISO_PIN PB14
105 #define SPI2_MOSI_PIN PB15
107 #define USE_SPI_DEVICE_3
108 #define SPI3_NSS_PIN PA15
109 #define SPI3_SCK_PIN PC10
110 #define SPI3_MISO_PIN PC11
111 #define SPI3_MOSI_PIN PB5
113 // ******* ADC ********
115 #define ADC_CHANNEL_1_PIN PC1
116 #define ADC_CHANNEL_2_PIN PC2
117 #define ADC_CHANNEL_3_PIN PC3
119 #define VBAT_ADC_CHANNEL ADC_CHN_1
120 #define RSSI_ADC_CHANNEL ADC_CHN_2
121 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
123 #define VBAT_SCALE_DEFAULT 1100
125 // ******* OSD ********
127 #define MAX7456_SPI_BUS BUS_SPI2
128 #define MAX7456_CS_PIN SPI2_NSS_PIN
130 //******* FLASH ********
132 #define USE_FLASH_M25P16
133 #define M25P16_CS_PIN SPI3_NSS_PIN
134 #define M25P16_SPI_BUS BUS_SPI3
136 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
138 //************ LEDSTRIP *****************
139 #define USE_LED_STRIP
140 #define WS2811_PIN PB3
142 // ******* FEATURES ********
143 #define SERIALRX_UART SERIAL_PORT_USART1
144 #define SERIALRX_PROVIDER SERIALRX_SBUS
146 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY)
148 #define TARGET_IO_PORTA 0xffff
149 #define TARGET_IO_PORTB 0xffff
150 #define TARGET_IO_PORTC 0xffff
151 #define TARGET_IO_PORTD (BIT(2))
153 #define MAX_PWM_OUTPUT_PORTS 8
154 #define TARGET_MOTOR_COUNT 8
156 // ESC-related features
158 #define USE_ESC_SENSOR
159 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
161 #define USE_RANGEFINDER
162 #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
163 #define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
164 #define PITOT_I2C_BUS DEFAULT_I2C_BUS