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 "FX74"
21 #define USBD_PRODUCT_STRING "FOXEER F722 V4"
26 #define BEEPER_INVERTED
30 #define USE_IMU_ICM42605
31 #define IMU_ICM42605_ALIGN CW270_DEG
32 #define ICM42605_SPI_BUS BUS_SPI1
33 #define ICM42605_CS_PIN PB2
35 #define USE_IMU_MPU6000
36 #define IMU_MPU6000_ALIGN CW270_DEG
37 #define MPU6000_CS_PIN PB2
38 #define MPU6000_SPI_BUS BUS_SPI1
40 #define USE_IMU_MPU6500
41 #define IMU_MPU6500_ALIGN CW270_DEG
42 #define MPU6500_CS_PIN PB2
43 #define MPU6500_SPI_BUS BUS_SPI1
47 #define USE_SPI_DEVICE_1
48 #define SPI1_SCK_PIN PA5
49 #define SPI1_MISO_PIN PA6
50 #define SPI1_MOSI_PIN PA7
52 #define USE_SPI_DEVICE_2
53 #define SPI2_SCK_PIN PB13
54 #define SPI2_MISO_PIN PB14
55 #define SPI2_MOSI_PIN PB15
57 #define USE_SPI_DEVICE_3
58 #define SPI3_SCK_PIN PC10
59 #define SPI3_MISO_PIN PC11
60 #define SPI3_MOSI_PIN PB5
63 #define USE_I2C_DEVICE_1
67 /*** Onboard flash ***/
69 #define USE_FLASH_M25P16
70 #define M25P16_CS_PIN PB12
71 #define M25P16_SPI_BUS BUS_SPI2
75 #define MAX7456_SPI_BUS BUS_SPI3
76 #define MAX7456_CS_PIN PC3
78 /*** Serial ports ***/
82 #define UART1_TX_PIN PB6
83 #define UART1_RX_PIN PB7
88 #define UART3_TX_PIN PB10
89 #define UART3_RX_PIN PB11
92 #define UART4_TX_PIN PA0
93 #define UART4_RX_PIN PA1
96 #define UART5_TX_PIN PC12
97 #define UART5_RX_PIN PD2
99 #ifdef FOXEERF722V4_X8
100 //X8 variant without UART2 and UART6
101 #define SERIAL_PORT_COUNT 5
104 #define SERIAL_PORT_COUNT 7
107 #define UART2_TX_PIN PA2
108 #define UART2_RX_PIN PA3
111 #define UART6_TX_PIN PC6
112 #define UART6_RX_PIN PC7
119 #define BARO_I2C_BUS BUS_I2C1
120 #define USE_BARO_BMP280
121 #define USE_BARO_MS5611
122 #define USE_BARO_DPS310
123 #define USE_BARO_SPL06
126 #define MAG_I2C_BUS BUS_I2C1
129 #define BNO055_I2C_BUS BUS_I2C1
133 #define ADC_CHANNEL_1_PIN PC0
134 #define ADC_CHANNEL_2_PIN PC2
135 #define ADC_CHANNEL_3_PIN PA0
137 #define VBAT_ADC_CHANNEL ADC_CHN_1
138 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
139 #define RSSI_ADC_CHANNEL ADC_CHN_3
142 #define USE_LED_STRIP
143 #define WS2811_PIN PA15
145 /*** Default settings ***/
146 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
147 #define SERIALRX_UART SERIAL_PORT_USART1
148 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
149 #define SERIALRX_PROVIDER SERIALRX_SBUS
151 /*** Timer/PWM output ***/
152 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
154 #ifdef FOXEERF722V4_X8
155 #define MAX_PWM_OUTPUT_PORTS 8
157 #define MAX_PWM_OUTPUT_PORTS 4
161 #define USE_ESC_SENSOR
164 #define TARGET_IO_PORTA 0xffff
165 #define TARGET_IO_PORTB 0xffff
166 #define TARGET_IO_PORTC 0xffff
167 #define TARGET_IO_PORTD (BIT(2))