vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / SKYSTARSF722HD / target.h
blobd46e2cf162ffb5eb371c3033d80adba5d2a109b4
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 #ifdef SKYSTARSF7MINIHD
21 #define TARGET_BOARD_IDENTIFIER "SS7M"
22 #define USBD_PRODUCT_STRING "SkystarsF722MiniHD"
23 #elif defined(SKYSTARSF722HDPRO)
24 #define TARGET_BOARD_IDENTIFIER "SS7P"
25 #define USBD_PRODUCT_STRING "SkystarsF722HDPRO"
26 #else
27 #define TARGET_BOARD_IDENTIFIER "SS7D"
28 #define USBD_PRODUCT_STRING "SkystarsF722HD"
29 #endif
31 #define LED0 PC14 // green
32 #define LED1 PC15 // blue
34 #define BEEPER PB2
35 #define BEEPER_INVERTED
37 // *************** Gyro & Acc **********************
38 #define USE_SPI
39 #define USE_SPI_DEVICE_1
41 #define SPI1_SCK_PIN PA5
42 #define SPI1_MISO_PIN PA6
43 #define SPI1_MOSI_PIN PA7
45 #ifdef SKYSTARSF722MINIHD
46 #define MPU6000_CS_PIN PA4
47 #define MPU6000_SPI_BUS BUS_SPI1
49 #define USE_IMU_MPU6000
50 #define IMU_MPU6000_ALIGN CW270_DEG
51 #elif defined(SKYSTARSF722HDPRO)
52 #define MPU6000_CS_PIN PA4
53 #define MPU6000_SPI_BUS BUS_SPI1
54 #define USE_IMU_MPU6000
55 #define IMU_MPU6000_ALIGN CW270_DEG_FLIP
57 #define ICM42605_CS_PIN PA4
58 #define ICM42605_SPI_BUS BUS_SPI1
59 #define USE_IMU_ICM42605
60 #define IMU_ICM42605_ALIGN CW90_DEG_FLIP
62 #define BMI270_CS_PIN PA4
63 #define BMI270_SPI_BUS BUS_SPI1
64 #define USE_IMU_BMI270
65 #define IMU_BMI270_ALIGN CW90_DEG_FLIP
67 #else
68 #define BMI270_CS_PIN PA4
69 #define BMI270_SPI_BUS BUS_SPI1
71 #define USE_IMU_BMI270
72 #define IMU_BMI270_ALIGN CW90_DEG_FLIP
73 #endif
75 // *************** M25P256 flash ********************
76 #define USE_FLASHFS
77 #define USE_FLASH_M25P16
79 #define USE_SPI_DEVICE_3
80 #define SPI3_SCK_PIN PC10
81 #define SPI3_MISO_PIN PC11
82 #define SPI3_MOSI_PIN PB5
84 #define M25P16_SPI_BUS BUS_SPI3
85 #define M25P16_CS_PIN PA15
87 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
89 // *************** OSD & baro ***********************
90 #define USE_SPI_DEVICE_2
91 #define SPI2_SCK_PIN PB13
92 #define SPI2_MISO_PIN PB14
93 #define SPI2_MOSI_PIN PB15
95 #define USE_MAX7456
96 #define MAX7456_SPI_BUS BUS_SPI2
97 #define MAX7456_CS_PIN PB12
99 #define USE_BARO
100 #define USE_BARO_BMP280
101 #define BMP280_SPI_BUS BUS_SPI2
102 #define BMP280_CS_PIN PB1
103 #ifdef SKYSTARSF722HDPRO
104 #define USE_BARO_SPL06
105 #define SPL06_SPI_BUS BUS_SPI2
106 #define SPL06_CS_PIN PB1
107 #endif
109 // *************** UART *****************************
110 #define USE_VCP
112 #define USE_UART1
113 #define UART1_RX_PIN PA10
114 #define UART1_TX_PIN PA9
116 #define USE_UART2
117 #define UART2_RX_PIN PA3
118 #define UART2_TX_PIN PA2
120 #define USE_UART3
121 #define UART3_RX_PIN PB11
122 #define UART3_TX_PIN PB10
124 #define USE_UART4
125 #define UART4_RX_PIN PA1
126 #define UART4_TX_PIN PA0
128 #define USE_UART5
129 #define UART5_RX_PIN PD2
130 #define UART5_TX_PIN PC12
132 #define USE_UART6
133 #define UART6_RX_PIN PC7
134 #define UART6_TX_PIN PC6
136 #define SERIAL_PORT_COUNT 7
138 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
139 #define SERIALRX_PROVIDER SERIALRX_SBUS
140 #define SERIALRX_UART SERIAL_PORT_USART1
142 // *************** I2C ****************************
143 #define USE_I2C
144 #define USE_I2C_DEVICE_1
145 #define I2C1_SCL PB8
146 #define I2C1_SDA PB9
148 #define DEFAULT_I2C_BUS BUS_I2C1
150 #define USE_MAG
151 #define MAG_I2C_BUS DEFAULT_I2C_BUS
152 #define USE_MAG_ALL
154 #define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
156 #define USE_RANGEFINDER
157 #define USE_RANGEFINDER_MSP
158 #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
160 #define PITOT_I2C_BUS DEFAULT_I2C_BUS
162 // *************** ADC *****************************
163 #define USE_ADC
164 #define ADC_CHANNEL_1_PIN PC1
165 #define ADC_CHANNEL_2_PIN PC2
166 #define ADC_CHANNEL_3_PIN PC3
167 #define VBAT_ADC_CHANNEL ADC_CHN_1
168 #define RSSI_ADC_CHANNEL ADC_CHN_2
169 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
171 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY )
173 #define USE_LED_STRIP
174 #define WS2811_PIN PB3
176 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
178 #define TARGET_IO_PORTA 0xffff
179 #define TARGET_IO_PORTB 0xffff
180 #define TARGET_IO_PORTC 0xffff
181 #define TARGET_IO_PORTD 0xffff
183 #define USE_DSHOT
184 #define USE_ESC_SENSOR
186 #define MAX_PWM_OUTPUT_PORTS 4