vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / FOXEERF745AIO / target.h
blob860ea18d8617562f53b15c040d1140a793eebc86
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 TARGET_BOARD_IDENTIFIER "FXF5"
21 #define USBD_PRODUCT_STRING "FOXEERF745AIO"
23 /*** Indicators ***/
24 #define LED0 PC13
25 #define BEEPER PD2
26 #define BEEPER_INVERTED
28 /*** IMU sensors ***/
29 #ifdef FOXEERF745AIO_V3
31 #define USE_IMU_ICM42605
32 #define IMU_ICM42605_ALIGN CW90_DEG
33 #define ICM42605_SPI_BUS BUS_SPI3
34 #define ICM42605_CS_PIN PA15
36 #else
38 // MPU6000
39 #define USE_IMU_MPU6000
40 #define IMU_MPU6000_ALIGN CW180_DEG
41 #define MPU6000_CS_PIN PA15
42 #define MPU6000_SPI_BUS BUS_SPI3
44 #endif
46 /*** SPI/I2C bus ***/
47 #define USE_SPI
48 #define USE_SPI_DEVICE_1
49 #define SPI1_SCK_PIN PA5
50 #define SPI1_MISO_PIN PA6
51 #define SPI1_MOSI_PIN PA7
53 #define USE_SPI_DEVICE_3
54 #define SPI3_SCK_PIN PC10
55 #define SPI3_MISO_PIN PC11
56 #define SPI3_MOSI_PIN PC12
58 #define USE_SPI_DEVICE_4
59 #define SPI4_SCK_PIN PE2
60 #define SPI4_MISO_PIN PE5
61 #define SPI4_MOSI_PIN PE6
63 #define USE_I2C
64 #define USE_I2C_DEVICE_1
65 #define I2C1_SCL PB8
66 #define I2C1_SDA PB9
68 /*** Onboard flash ***/
69 #define USE_FLASHFS
70 #define USE_FLASH_M25P16
71 #define M25P16_CS_PIN PE4
72 #define M25P16_SPI_BUS BUS_SPI4
74 /*** OSD ***/
75 #define USE_MAX7456
76 #define MAX7456_SPI_BUS BUS_SPI1
77 #define MAX7456_CS_PIN PA4
79 /*** Serial ports ***/
80 #define USE_VCP
82 #define USE_UART1
83 #define UART1_TX_PIN PA9
84 #define UART1_RX_PIN PA10
86 #define USE_UART2
87 #define UART2_TX_PIN PA2
88 #define UART2_RX_PIN PA3
90 #define USE_UART3
91 #define UART3_TX_PIN PB10
92 #define UART3_RX_PIN PB11
94 #define USE_UART4
95 #define UART4_TX_PIN PA0
96 #define UART4_RX_PIN PA1
98 #define USE_UART7
99 #define UART7_TX_PIN PE8
100 #define UART7_RX_PIN PE7
103 #define SERIAL_PORT_COUNT 6
105 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_VBAT | FEATURE_CURRENT_METER)
107 /*** BARO & MAG ***/
108 #define USE_BARO
109 #define BARO_I2C_BUS BUS_I2C1
110 #define USE_BARO_BMP280
111 #define USE_BARO_MS5611
113 #define USE_MAG
114 #define MAG_I2C_BUS BUS_I2C1
115 #define USE_MAG_ALL
117 /*** ADC ***/
118 #define USE_ADC
119 #define ADC_CHANNEL_1_PIN PC3
120 #define ADC_CHANNEL_2_PIN PC5
121 #define ADC_CHANNEL_3_PIN PC2
123 #define VBAT_ADC_CHANNEL ADC_CHN_1
124 #define RSSI_ADC_CHANNEL ADC_CHN_2
125 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
127 /*** LED STRIP ***/
128 #define USE_LED_STRIP
129 #define WS2811_PIN PA8
131 /*** Default settings ***/
132 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
133 #define SERIALRX_UART SERIAL_PORT_USART1
134 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
135 #define SERIALRX_PROVIDER SERIALRX_SBUS
136 #define CURRENT_METER_SCALE 100
138 /*** Timer/PWM output ***/
139 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
140 #define MAX_PWM_OUTPUT_PORTS 4
141 #define USE_DSHOT
142 #define USE_ESC_SENSOR
144 /*** Used pins ***/
145 #define TARGET_IO_PORTA 0xffff
146 #define TARGET_IO_PORTB 0xffff
147 #define TARGET_IO_PORTC 0xffff
148 #define TARGET_IO_PORTD 0xffff
149 #define TARGET_IO_PORTE 0xffff