Set blackbox file handler to NULL after closing file
[inav.git] / src / main / target / DAKEFPVF722 / target.h
blob92cc65783b825d1c87fe4f338f4637b53a6c504b
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 "DAK7"
21 #define USBD_PRODUCT_STRING "DAKEFPV F722"
23 #define LED0 PC14
24 #define LED1 PC15
26 #define BEEPER PC3
27 #define BEEPER_INVERTED
29 // Buses
30 #define USE_SPI
31 #define USE_SPI_DEVICE_1
33 #define SPI1_SCK_PIN PA5
34 #define SPI1_MISO_PIN PA6
35 #define SPI1_MOSI_PIN PA7
37 #define USE_SPI_DEVICE_2
38 #define SPI2_SCK_PIN PB13
39 #define SPI2_MISO_PIN PB14
40 #define SPI2_MOSI_PIN PB15
42 #define USE_SPI_DEVICE_3
43 #define SPI3_SCK_PIN PC10
44 #define SPI3_MISO_PIN PC11
45 #define SPI3_MOSI_PIN PB5
47 #define USE_I2C
48 #define USE_I2C_DEVICE_1
49 #define I2C1_SCL PB8
50 #define I2C1_SDA PB9
52 #define DEFAULT_I2C_BUS BUS_I2C1
54 // Gyro
55 #define USE_IMU_MPU6500
56 #define IMU_MPU6500_ALIGN CW90_DEG
57 #define MPU6500_CS_PIN PA4
58 #define MPU6500_SPI_BUS BUS_SPI1
60 //Baro
61 #define USE_BARO
62 #define USE_BARO_BMP280
63 #define BMP280_SPI_BUS BUS_SPI2
64 #define BMP280_CS_PIN PA13
66 // M25P256 flash
67 #define USE_FLASHFS
68 #define USE_FLASH_M25P16
70 #define M25P16_SPI_BUS BUS_SPI3
71 #define M25P16_CS_PIN PA15
73 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
75 // OSD
76 #define USE_MAX7456
77 #define MAX7456_SPI_BUS BUS_SPI2
78 #define MAX7456_CS_PIN PB12
80 // Serial ports
81 #define USE_VCP
83 #define USE_UART1
84 #define UART1_RX_PIN PA10
85 #define UART1_TX_PIN PA9
87 #define USE_UART2
88 #define UART2_RX_PIN PA3
89 #define UART2_TX_PIN PA2
91 #define USE_UART3
92 #define UART3_RX_PIN PB11
93 #define UART3_TX_PIN PB10
95 #define USE_UART4
96 #define UART4_RX_PIN PA1
97 #define UART4_TX_PIN PA0
99 #define USE_UART5
100 #define UART5_RX_PIN PD2
101 #define UART5_TX_PIN PC12
103 #define USE_UART6
104 #define UART6_RX_PIN PC7
105 #define UART6_TX_PIN PC6
107 #define SERIAL_PORT_COUNT 7
109 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
110 #define SERIALRX_PROVIDER SERIALRX_SBUS
111 #define SERIALRX_UART SERIAL_PORT_USART1
113 // Mag
114 #define USE_MAG
115 #define MAG_I2C_BUS DEFAULT_I2C_BUS
116 #define USE_MAG_ALL
118 #define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
120 #define USE_RANGEFINDER
121 #define USE_RANGEFINDER_MSP
122 #define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
124 #define PITOT_I2C_BUS DEFAULT_I2C_BUS
126 // ADC
127 #define USE_ADC
128 #define ADC_CHANNEL_1_PIN PC1
129 #define ADC_CHANNEL_2_PIN PC2
130 #define ADC_CHANNEL_3_PIN PC0
131 #define VBAT_ADC_CHANNEL ADC_CHN_1
132 #define RSSI_ADC_CHANNEL ADC_CHN_2
133 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
135 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY )
137 #define USE_LED_STRIP
138 #define WS2811_PIN PB3
140 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
142 #define TARGET_IO_PORTA 0xffff
143 #define TARGET_IO_PORTB 0xffff
144 #define TARGET_IO_PORTC 0xffff
145 #define TARGET_IO_PORTD 0xffff
147 #define USE_DSHOT
148 #define USE_ESC_SENSOR
150 #define MAX_PWM_OUTPUT_PORTS 6