vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / FOXEERF405 / target.h
blob7f97e832b9562f8d50e2a9fdbfce3681fb8f6292
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 "FXF4"
21 #define USBD_PRODUCT_STRING "FOXEERF405"
23 /*** Indicators ***/
24 #define LED0 PC15
25 #define BEEPER PA4
26 #define BEEPER_INVERTED
28 // MPU6000
29 #define USE_IMU_MPU6000
30 #define IMU_MPU6000_ALIGN CW90_DEG
31 #define MPU6000_CS_PIN PB2
32 #define MPU6000_SPI_BUS BUS_SPI1
34 // ICM20689 - handled by MPU6500 driver
35 #define USE_IMU_MPU6500
36 #define IMU_MPU6500_ALIGN CW90_DEG
37 #define MPU6500_CS_PIN PB2
38 #define MPU6500_SPI_BUS BUS_SPI1
40 /*** SPI/I2C bus ***/
41 #define USE_SPI
42 #define USE_SPI_DEVICE_1
43 #define SPI1_SCK_PIN PA5
44 #define SPI1_MISO_PIN PA6
45 #define SPI1_MOSI_PIN PA7
47 #define USE_SPI_DEVICE_2
48 #define SPI2_SCK_PIN PB13
49 #define SPI2_MISO_PIN PB14
50 #define SPI2_MOSI_PIN PC3
52 #define USE_SPI_DEVICE_3
53 #define SPI3_SCK_PIN PC10
54 #define SPI3_MISO_PIN PC11
55 #define SPI3_MOSI_PIN PB5
57 #define USE_I2C
58 #define USE_I2C_DEVICE_1
59 #define I2C1_SCL PB8
60 #define I2C1_SDA PB9
62 /*** Onboard flash ***/
63 #define USE_FLASHFS
64 #define USE_FLASH_M25P16
65 #define M25P16_CS_PIN PB12
66 #define M25P16_SPI_BUS BUS_SPI2
68 /*** OSD ***/
69 #define USE_MAX7456
70 #define MAX7456_SPI_BUS BUS_SPI3
71 #define MAX7456_CS_PIN PA15
73 /*** Serial ports ***/
74 #define USE_VCP
76 #define USE_UART1
77 #define UART1_RX_PIN PB7
78 #define UART1_TX_PIN PA9
80 #define USE_UART2
81 #define UART2_RX_PIN PA3
82 #define UART2_TX_PIN PA2
84 #define USE_UART3
85 #define UART3_RX_PIN PB11
86 #define UART3_TX_PIN PB10
88 #define USE_UART4
89 #define UART4_RX_PIN PA1
90 #define UART4_TX_PIN PA0
92 #define USE_UART5
93 #define UART5_RX_PIN PD2
94 #define UART5_TX_PIN PC12
96 #define SERIAL_PORT_COUNT 6
98 /*** BARO & MAG ***/
99 #define USE_BARO
100 #define BARO_I2C_BUS BUS_I2C1
101 #define USE_BARO_BMP280
102 #define USE_BARO_MS5611
103 #define USE_BARO_BMP085
105 #define USE_MAG
106 #define MAG_I2C_BUS BUS_I2C1
107 #define USE_MAG_ALL
109 /*** ADC ***/
110 #define USE_ADC
111 #define ADC_CHANNEL_1_PIN PC0
112 #define ADC_CHANNEL_2_PIN PC1
114 #define VBAT_ADC_CHANNEL ADC_CHN_1
115 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
117 /*** LED STRIP ***/
118 #define USE_LED_STRIP
119 #define WS2811_PIN PA10
121 /*** Default settings ***/
122 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
123 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
124 #define SERIALRX_PROVIDER SERIALRX_SBUS
125 #define CURRENT_METER_SCALE 166
127 /*** Timer/PWM output ***/
128 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
129 #define MAX_PWM_OUTPUT_PORTS 6
130 #define USE_DSHOT
131 #define USE_ESC_SENSOR
133 /*** Used pins ***/
134 #define TARGET_IO_PORTA 0xffff
135 #define TARGET_IO_PORTB 0xffff
136 #define TARGET_IO_PORTC 0xffff
137 #define TARGET_IO_PORTD (BIT(2))