Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / target / MAMBAF722_X8 / target.h
blob1a89d3bf31f0eb34475a8199b7723fe88c4e54dc
1 /*
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/>.
18 #pragma once
20 #define USE_TARGET_CONFIG
22 #define TARGET_BOARD_IDENTIFIER "M7X8"
23 #define USBD_PRODUCT_STRING "MAMBAF722_X8"
25 // ******** Board LEDs **********************
26 #define LED0 PC15
27 #define LED1 PC14
29 // ******* Beeper ***********
30 #define BEEPER PB2
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
39 #define USE_I2C
41 #define USE_I2C_DEVICE_1
42 #define I2C1_SCL PB8
43 #define I2C1_SDA PB9
44 #define DEFAULT_I2C_BUS BUS_I2C1
47 // *************** Baro **************************
48 #define USE_BARO
49 #define BARO_I2C_BUS DEFAULT_I2C_BUS
50 #define USE_BARO_BMP280
51 #define USE_BARO_MS5611
53 //*********** Magnetometer / Compass *************
54 #define USE_MAG
55 #define MAG_I2C_BUS DEFAULT_I2C_BUS
56 #define USE_MAG_ALL
58 // ******* SERIAL ********
59 #define USE_VCP
60 #define USE_UART1
61 #define USE_UART2
62 #define USE_UART3
63 #define USE_UART4
64 #define USE_UART5
65 #define USE_UART6
67 #define UART1_TX_PIN PB6
68 #define UART1_RX_PIN PB7
70 #define UART2_TX_PIN PA2
71 #define UART2_RX_PIN PA3
73 #define UART3_TX_PIN PB10
74 #define UART3_RX_PIN PB11
76 #define UART4_TX_PIN PA0
77 #define UART4_RX_PIN PA1
79 #define UART5_TX_PIN PC12
80 #define UART5_RX_PIN PD2
82 #define UART6_TX_PIN PC6
83 #define UART6_RX_PIN PC7
85 #define SERIAL_PORT_COUNT 7
87 // ******* SPI ********
88 #define USE_SPI
90 #define USE_SPI_DEVICE_1
91 #define SPI1_NSS_PIN PA4
92 #define SPI1_SCK_PIN PA5
93 #define SPI1_MISO_PIN PA6
94 #define SPI1_MOSI_PIN PA7
96 #define USE_SPI_DEVICE_2
97 #define SPI2_NSS_PIN PB12
98 #define SPI2_SCK_PIN PB13
99 #define SPI2_MISO_PIN PB14
100 #define SPI2_MOSI_PIN PB15
102 #define USE_SPI_DEVICE_3
103 #define SPI3_NSS_PIN PA15
104 #define SPI3_SCK_PIN PC10
105 #define SPI3_MISO_PIN PC11
106 #define SPI3_MOSI_PIN PB5
108 // ******* ADC ********
109 #define USE_ADC
110 #define ADC_CHANNEL_1_PIN PC1
111 #define ADC_CHANNEL_2_PIN PC2
112 #define ADC_CHANNEL_3_PIN PC3
114 #define VBAT_ADC_CHANNEL ADC_CHN_1
115 #define RSSI_ADC_CHANNEL ADC_CHN_2
116 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
118 #define VBAT_SCALE_DEFAULT 1100
120 // ******* OSD ********
121 #define USE_MAX7456
122 #define MAX7456_SPI_BUS BUS_SPI2
123 #define MAX7456_CS_PIN SPI2_NSS_PIN
125 //******* FLASH ********
126 #define USE_FLASHFS
127 #define USE_FLASH_M25P16
128 #define M25P16_CS_PIN SPI3_NSS_PIN
129 #define M25P16_SPI_BUS BUS_SPI3
131 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
133 //************ LEDSTRIP *****************
134 #define USE_LED_STRIP
135 #define WS2811_PIN PB3
137 // ******* FEATURES ********
138 #define SERIALRX_UART SERIAL_PORT_USART1
139 #define SERIALRX_PROVIDER SERIALRX_SBUS
141 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY)
143 #define TARGET_IO_PORTA 0xffff
144 #define TARGET_IO_PORTB 0xffff
145 #define TARGET_IO_PORTC 0xffff
146 #define TARGET_IO_PORTD (BIT(2))
148 #define MAX_PWM_OUTPUT_PORTS 8
149 #define TARGET_MOTOR_COUNT 8
151 // ESC-related features
152 #define USE_DSHOT
153 #define USE_ESC_SENSOR
154 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
156 #define USE_RANGEFINDER
157 #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
158 #define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
159 #define PITOT_I2C_BUS DEFAULT_I2C_BUS