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/>.
20 #define TARGET_BOARD_IDENTIFIER "FXF7"
21 #define USBD_PRODUCT_STRING "FOXEER722DUAL"
26 #define BEEPER_INVERTED
28 // We use dual IMU sensors, they have to be described in the target file
29 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
36 #define USE_IMU_MPU6000
37 #define IMU_MPU6000_ALIGN CW270_DEG
38 #define MPU6000_CS_PIN PB2
39 #define MPU6000_SPI_BUS BUS_SPI1
41 // ICM20602 - handled by MPU6500 driver
43 #define USE_IMU_MPU6500
44 #define IMU_MPU6500_ALIGN CW180_DEG
45 #define MPU6500_CS_PIN PB1
46 #define MPU6500_SPI_BUS BUS_SPI1
51 #define USE_SPI_DEVICE_1
52 #define SPI1_SCK_PIN PA5
53 #define SPI1_MISO_PIN PA6
54 #define SPI1_MOSI_PIN PA7
56 #define USE_SPI_DEVICE_2
57 #define SPI2_SCK_PIN PB13
58 #define SPI2_MISO_PIN PB14
59 #define SPI2_MOSI_PIN PB15
61 #define USE_SPI_DEVICE_3
62 #define SPI3_SCK_PIN PC10
63 #define SPI3_MISO_PIN PC11
64 #define SPI3_MOSI_PIN PB5
67 #define USE_I2C_DEVICE_1
71 /*** Onboard flash ***/
73 #define USE_FLASH_M25P16
74 #define M25P16_CS_PIN PB12
75 #define M25P16_SPI_BUS BUS_SPI2
79 #define MAX7456_SPI_BUS BUS_SPI3
80 #define MAX7456_CS_PIN PC3
82 /*** Serial ports ***/
86 #define UART1_TX_PIN PB6
87 #define UART1_RX_PIN PB7
90 #define UART2_TX_PIN PA2
91 #define UART2_RX_PIN PA3
94 #define UART3_TX_PIN PB10
95 #define UART3_RX_PIN PB11
98 #define UART4_TX_PIN PA0
99 #define UART4_RX_PIN PA1
102 #define UART5_TX_PIN PC12
103 #define UART5_RX_PIN PD2
105 #define SERIAL_PORT_COUNT 6
109 #define BARO_I2C_BUS BUS_I2C1
110 #define USE_BARO_BMP280
111 #define USE_BARO_MS5611
114 #define MAG_I2C_BUS BUS_I2C1
119 #define ADC_CHANNEL_1_PIN PC0
120 #define ADC_CHANNEL_2_PIN PC2
121 #define ADC_CHANNEL_3_PIN PA0
123 #define VBAT_ADC_CHANNEL ADC_CHN_1
124 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
125 #define RSSI_ADC_CHANNEL ADC_CHN_3
128 #define USE_LED_STRIP
129 #define WS2811_PIN PA15
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 166
138 /*** Timer/PWM output ***/
139 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
140 #define MAX_PWM_OUTPUT_PORTS 6
142 #define USE_ESC_SENSOR
145 #define TARGET_IO_PORTA 0xffff
146 #define TARGET_IO_PORTB 0xffff
147 #define TARGET_IO_PORTC 0xffff
148 #define TARGET_IO_PORTD (BIT(2))
151 // *************** PINIO ***************************
152 #if defined(FOXEERF722V2)
155 #define PINIO1_PIN PC6 // Enable GPS power
156 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED