[FLYWOOF411] add board documentation
[inav/snaewe.git] / src / main / target / FOXEERF722DUAL / target.h
blob75eec081ff589f5f88aa5f80e221546963343b22
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 "FXF7"
21 #define USBD_PRODUCT_STRING "FOXEER722DUAL"
23 /*** Indicators ***/
24 #define LED0 PC15
25 #define BEEPER PA4
26 #define BEEPER_INVERTED
28 /*** IMU sensors ***/
29 #define USE_EXTI
31 // We use dual IMU sensors, they have to be described in the target file
32 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
33 #define USE_MPU_DATA_READY_SIGNAL
34 #define USE_DUAL_GYRO
36 // MPU6000
37 #define USE_IMU_MPU6000
38 #define IMU_MPU6000_ALIGN CW270_DEG
39 #define MPU6000_CS_PIN PB2
40 #define MPU6000_SPI_BUS BUS_SPI1
41 #define MPU6000_EXTI_PIN PC4
43 // ICM20602 - handled by MPU6500 driver
44 #define USE_IMU_MPU6500
45 #define IMU_MPU6500_ALIGN CW180_DEG
46 #define MPU6500_CS_PIN PB1
47 #define MPU6500_SPI_BUS BUS_SPI1
48 #define MPU6500_EXTI_PIN PB0
50 /*** SPI/I2C bus ***/
51 #define USE_SPI
52 #define USE_SPI_DEVICE_1
53 #define SPI1_SCK_PIN PA5
54 #define SPI1_MISO_PIN PA6
55 #define SPI1_MOSI_PIN PA7
57 #define USE_SPI_DEVICE_2
58 #define SPI2_SCK_PIN PB13
59 #define SPI2_MISO_PIN PB14
60 #define SPI2_MOSI_PIN PB15
62 #define USE_SPI_DEVICE_3
63 #define SPI3_SCK_PIN PC10
64 #define SPI3_MISO_PIN PC11
65 #define SPI3_MOSI_PIN PB5
67 #define USE_I2C
68 #define USE_I2C_DEVICE_1
69 #define I2C1_SCL PB8
70 #define I2C1_SDA PB9
72 /*** Onboard flash ***/
73 #define USE_FLASHFS
74 #define USE_FLASH_M25P16
75 #define M25P16_CS_PIN PB12
76 #define M25P16_SPI_BUS BUS_SPI2
78 /*** OSD ***/
79 #define USE_OSD
80 #define USE_MAX7456
81 #define MAX7456_SPI_BUS BUS_SPI3
82 #define MAX7456_CS_PIN PC3
84 /*** Serial ports ***/
85 #define USE_VCP
87 #define USE_UART1
88 #define UART1_TX_PIN PB6
89 #define UART1_RX_PIN PB7
91 #define USE_UART2
92 #define UART2_TX_PIN PA2
93 #define UART2_RX_PIN PA3
95 #define USE_UART3
96 #define UART3_TX_PIN PB10
97 #define UART3_RX_PIN PB11
99 #define USE_UART4
100 #define UART4_TX_PIN PA0
101 #define UART4_RX_PIN PA1
103 #define USE_UART5
104 #define UART5_TX_PIN PC12
105 #define UART5_RX_PIN PD2
107 #define SERIAL_PORT_COUNT 6
109 /*** BARO & MAG ***/
110 #define USE_BARO
111 #define BARO_I2C_BUS BUS_I2C1
112 #define USE_BARO_BMP280
113 #define USE_BARO_MS5611
115 #define USE_MAG
116 #define MAG_I2C_BUS BUS_I2C1
117 #define USE_MAG_HMC5883
118 #define USE_MAG_QMC5883
119 #define USE_MAG_IST8310
120 #define USE_MAG_MAG3110
121 #define USE_MAG_LIS3MDL
123 /*** ADC ***/
124 #define USE_ADC
125 #define ADC_CHANNEL_1_PIN PC0
126 #define ADC_CHANNEL_2_PIN PC2
127 #define ADC_CHANNEL_3_PIN PA0
129 #define VBAT_ADC_CHANNEL ADC_CHN_1
130 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
131 #define RSSI_ADC_CHANNEL ADC_CHN_3
133 /*** LED STRIP ***/
134 #define USE_LED_STRIP
135 #define WS2811_PIN PA15
137 /*** Default settings ***/
138 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
139 #define SERIALRX_UART SERIAL_PORT_USART1
140 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
141 #define SERIALRX_PROVIDER SERIALRX_SBUS
142 //#define CURRENT_METER_SCALE 166
144 /*** Timer/PWM output ***/
145 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
146 #define MAX_PWM_OUTPUT_PORTS 6
147 #define USE_DSHOT
148 #define USE_ESC_SENSOR
150 /*** Used pins ***/
151 #define TARGET_IO_PORTA 0xffff
152 #define TARGET_IO_PORTB 0xffff
153 #define TARGET_IO_PORTC 0xffff
154 #define TARGET_IO_PORTD (BIT(2))