vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / MAMBAF722_WING / target.h
blob654b9afdfbc1abfdd234bc914bbee75558cb57c0
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 "M72W"
23 #define USBD_PRODUCT_STRING "MAMBAF722_WING"
25 // ******** Board LEDs **********************
26 #define LED0 PC15
27 #define LED1 PC14
29 // ******* Beeper ***********
30 #define BEEPER PB2
31 #define BEEPER_INVERTED
33 // ******* GYRO and ACC ********
34 #define USE_IMU_ICM42605
35 #define IMU_ICM42605_ALIGN CW90_DEG
36 #define ICM42605_SPI_BUS BUS_SPI1
37 #define ICM42605_CS_PIN SPI1_NSS_PIN
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
46 // *************** Baro **************************
47 #define USE_BARO
48 #define BARO_I2C_BUS DEFAULT_I2C_BUS
49 #define USE_BARO_BMP280
50 #define USE_BARO_MS5611
51 #define USE_BARO_BMP085
52 #define USE_BARO_DPS310
53 #define USE_BARO_SPL06
55 //*********** Magnetometer / Compass *************
56 #define USE_MAG
57 #define MAG_I2C_BUS DEFAULT_I2C_BUS
58 #define USE_MAG_ALL
60 // ******* SERIAL ********
61 #define USE_VCP
62 #define USE_UART1
63 #define USE_UART2
64 #define USE_UART3
65 #define USE_UART4
66 #define USE_UART5
67 #define USE_UART6
69 #define UART1_TX_PIN PB6
70 #define UART1_RX_PIN PB7
72 #define UART2_TX_PIN PA2
73 #define UART2_RX_PIN PA3
75 #define UART3_TX_PIN PB10
76 #define UART3_RX_PIN PB11
78 #define UART4_TX_PIN PA0
79 #define UART4_RX_PIN PA1
81 #define UART5_TX_PIN PC12
82 #define UART5_RX_PIN PD2
84 #define UART6_TX_PIN PC6
85 #define UART6_RX_PIN PC7
87 #define SERIAL_PORT_COUNT 7
89 // ******* SPI ********
90 #define USE_SPI
92 #define USE_SPI_DEVICE_1
93 #define SPI1_NSS_PIN PA4
94 #define SPI1_SCK_PIN PA5
95 #define SPI1_MISO_PIN PA6
96 #define SPI1_MOSI_PIN PA7
98 #define USE_SPI_DEVICE_2
99 #define SPI2_NSS_PIN PB12
100 #define SPI2_SCK_PIN PB13
101 #define SPI2_MISO_PIN PB14
102 #define SPI2_MOSI_PIN PB15
104 #define USE_SPI_DEVICE_3
105 #define SPI3_NSS_PIN PA15
106 #define SPI3_SCK_PIN PC10
107 #define SPI3_MISO_PIN PC11
108 #define SPI3_MOSI_PIN PB5
110 // ******* ADC ********
111 #define USE_ADC
112 #define ADC_CHANNEL_1_PIN PC1
113 #define ADC_CHANNEL_2_PIN PC3
115 #define VBAT_ADC_CHANNEL ADC_CHN_1
116 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
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 DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
139 #define SERIALRX_UART SERIAL_PORT_USART1
140 #define SERIALRX_PROVIDER SERIALRX_SBUS
142 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY)
144 #define TARGET_IO_PORTA 0xffff
145 #define TARGET_IO_PORTB 0xffff
146 #define TARGET_IO_PORTC 0xffff
147 #define TARGET_IO_PORTD (BIT(2))
149 #define MAX_PWM_OUTPUT_PORTS 8
150 #define TARGET_MOTOR_COUNT 8
152 // ESC-related features
153 #define USE_DSHOT
154 #define USE_ESC_SENSOR
155 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
157 #define USE_RANGEFINDER
158 #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
159 #define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
160 #define PITOT_I2C_BUS DEFAULT_I2C_BUS
162 // *************** PINIO ***************************
163 #define USE_PINIO
164 #define USE_PINIOBOX
165 #define PINIO1_PIN PC0
166 #define PINIO2_PIN PC2