2 * This file is part of Cleanflight.
4 * Cleanflight 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 * Cleanflight 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>.
20 #define TARGET_BOARD_IDENTIFIER "FDV1"
22 #define USBD_PRODUCT_STRING "FishDroneF4NAV"
24 // *************** LED *****************************
25 #define LED0 PC13 // Red
26 #define LED1 PC14 // Yellow
28 // *************** BEEPER *****************************
31 // *************** SPI *****************************
34 // *************** ICM20608 *****************************
35 #define USE_SPI_DEVICE_1
36 #define MPU6500_CS_PIN PA4
37 #define MPU6500_SPI_BUS BUS_SPI1
38 #define MPU9250_CS_PIN PA4
39 #define MPU9250_SPI_BUS BUS_SPI1
41 #define USE_IMU_MPU6500
42 #define IMU_MPU6500_ALIGN CW180_DEG
44 #define USE_IMU_MPU9250
45 #define IMU_MPU9250_ALIGN CW180_DEG
47 // *************** Compass *****************************
49 #define MAG_I2C_BUS BUS_I2C1
52 // *************** Temperature sensor *****************
53 #define TEMPERATURE_I2C_BUS BUS_I2C1
55 // *************** BARO *****************************
57 #define BARO_I2C_BUS BUS_I2C1
58 #define USE_BARO_MS5611
60 // *************** OSD *****************************
61 #define USE_SPI_DEVICE_2
62 #define SPI2_NSS_PIN PB12
63 #define SPI2_SCK_PIN PB13
64 #define SPI2_MISO_PIN PC2
65 #define SPI2_MOSI_PIN PC3
68 #define MAX7456_SPI_BUS BUS_SPI2
69 #define MAX7456_CS_PIN SPI2_NSS_PIN
71 // *************** TF Support *****************************
72 #define USE_SPI_DEVICE_3
73 #define SPI3_SCK_PIN PB3
74 #define SPI3_MISO_PIN PB4
75 #define SPI3_MOSI_PIN PB5
76 #define SPI3_NSS_PIN PB6
79 #define USE_SDCARD_SPI
80 #define SDCARD_DETECT_INVERTED
81 #define SDCARD_DETECT_PIN PB7
82 #define SDCARD_SPI_BUS BUS_SPI3
83 #define SDCARD_CS_PIN PB6
85 // *************** Flash *****************************
86 #define M25P16_CS_PIN PA15
87 #define M25P16_SPI_BUS BUS_SPI3
89 #define USE_FLASH_M25P16
91 // *************** UART *****************************
94 #define USE_UART_INVERTER
96 // provide for Telemetry module
98 #define UART1_RX_PIN PA10
99 #define UART1_TX_PIN PA9
102 #define UART2_RX_PIN PA3
103 #define UART2_TX_PIN PA2
104 #define INVERTER_PIN_UART2_RX PB2
106 // provide for GPS module
108 #define UART5_RX_PIN PD2
109 #define UART5_TX_PIN PC12
111 #define SERIAL_PORT_COUNT 4 // VCP, USART1, USART2, USART5
113 // *************** WS2811 *****************************
114 #define USE_LED_STRIP
115 #define WS2811_PIN PB1
117 // *************** IIC *****************************
119 #define USE_I2C_DEVICE_1
123 // *************** ADC *****************************
125 #define ADC_CHANNEL_1_PIN PC0
126 #define ADC_CHANNEL_2_PIN PC1
127 #define ADC_CHANNEL_3_PIN PC5
128 #define VBAT_ADC_CHANNEL ADC_CHN_1
129 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
130 #define RSSI_ADC_CHANNEL ADC_CHN_3
131 #define VBAT_SCALE_DEFAULT 103
133 // *************** RANGEFINDER *****************************
134 // #define USE_RANGEFINDER
135 // #define USE_RANGEFINDER_SRF10
137 // *************** NAV *****************************
138 #define NAV_MAX_WAYPOINTS 60
140 // *************** Others *****************************
143 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
144 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
145 #define SERIALRX_PROVIDER SERIALRX_SBUS
146 #define SERIALRX_UART SERIAL_PORT_USART3
147 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX | FEATURE_RSSI_ADC | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY)
149 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
151 // Number of available PWM outputs
152 #define MAX_PWM_OUTPUT_PORTS 6
154 #define TARGET_IO_PORTA 0xffff
155 #define TARGET_IO_PORTB 0xffff
156 #define TARGET_IO_PORTC 0xffff
157 #define TARGET_IO_PORTD (BIT(2))