Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / target / FLYWOOF745 / target.h
blobd00c245594598661531ea16f7e35eec6f0e14251
1 /*
2 * This file is part of INAV.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #ifdef FLYWOOF745
24 #define TARGET_BOARD_IDENTIFIER "FWF7"
25 #define USBD_PRODUCT_STRING "FLYWOOF745"
26 #else
27 #define TARGET_BOARD_IDENTIFIER "FW7N"
28 #define USBD_PRODUCT_STRING "FLYWOOF745NANO"
29 #endif
31 #define LED0 PA2
33 #define BEEPER PD15
34 #define BEEPER_INVERTED
36 #define USE_DSHOT
37 #define USE_ESC_SENSOR
39 #define USE_IMU_MPU6000
40 #define IMU_MPU6000_ALIGN CW270_DEG
41 #define MPU6000_CS_PIN SPI4_NSS_PIN
42 #define MPU6000_SPI_BUS BUS_SPI4
44 #define USE_IMU_BMI270
45 #define IMU_BMI270_ALIGN CW270_DEG
46 #define BMI270_CS_PIN SPI4_NSS_PIN
47 #define BMI270_SPI_BUS BUS_SPI4
49 #define USE_IMU_ICM42605
50 #define IMU_ICM42605_ALIGN CW270_DEG
51 #define ICM42605_CS_PIN SPI4_NSS_PIN
52 #define ICM42605_SPI_BUS BUS_SPI4
54 #define USB_IO
55 #define USE_VCP
56 #define VBUS_SENSING_ENABLED
57 #define VBUS_SENSING_PIN PA8
59 #define USE_UART1
60 #define UART1_TX_PIN PA9
61 #define UART1_RX_PIN PA10
63 #define USE_UART2
64 #define UART2_TX_PIN PD5
65 #define UART2_RX_PIN PD6
67 #define USE_UART3
69 #ifdef FLYWOOF745
70 #define UART3_TX_PIN PB10
71 #define UART3_RX_PIN PB11
72 #else
73 #define UART3_TX_PIN PD8
74 #define UART3_RX_PIN PD9
75 #endif
77 #define USE_UART4
78 #define UART4_TX_PIN PA0
79 #define UART4_RX_PIN PA1
81 #define USE_UART5
82 #define UART5_TX_PIN PC12
83 #define UART5_RX_PIN PD2
85 #define USE_UART6
86 #define UART6_TX_PIN PC6
87 #define UART6_RX_PIN PC7
89 #define USE_UART7
90 #define UART7_TX_PIN PE8
91 #define UART7_RX_PIN PE7
93 #define SERIAL_PORT_COUNT 8 //VCP,UART1,UART2,UART3,UART4,UART5,UART6,UART7
95 #define USE_SPI
96 #define USE_SPI_DEVICE_1 //FLASH
97 #define USE_SPI_DEVICE_2 //OSD
98 #define USE_SPI_DEVICE_4 //ICM20689
100 #define SPI1_NSS_PIN PA4
101 #define SPI1_SCK_PIN PA5
102 #define SPI1_MISO_PIN PA6
103 #define SPI1_MOSI_PIN PA7
105 #define SPI2_NSS_PIN PB12
106 #define SPI2_SCK_PIN PB13
107 #define SPI2_MISO_PIN PB14
108 #define SPI2_MOSI_PIN PB15
110 #define SPI4_NSS_PIN PE4
111 #define SPI4_SCK_PIN PE2
112 #define SPI4_MISO_PIN PE5
113 #define SPI4_MOSI_PIN PE6
115 #define USE_MAX7456
116 #define MAX7456_SPI_BUS BUS_SPI2
117 #define MAX7456_CS_PIN SPI2_NSS_PIN
119 #define M25P16_CS_PIN SPI1_NSS_PIN
120 #define M25P16_SPI_BUS BUS_SPI1
121 #define USE_FLASHFS
122 #define USE_FLASH_M25P16
123 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
125 #define USE_I2C
126 #define USE_I2C_DEVICE_1
127 #define I2C1_SCL PB6
128 #define I2C1_SDA PB7
130 #ifdef FLYWOOF745NANO
131 #define USE_I2C_DEVICE_2
132 #define I2C2_SCL PB10
133 #define I2C2_SDA PB11
135 //External I2C bus is different than internal one
136 #define MAG_I2C_BUS BUS_I2C2
137 #define TEMPERATURE_I2C_BUS BUS_I2C2
138 #define RANGEFINDER_I2C_BUS BUS_I2C2
139 #define DEFAULT_I2C_BUS BUS_I2C2
141 #else
143 //External I2C bus is the same as interal one
144 #define MAG_I2C_BUS BUS_I2C1
145 #define TEMPERATURE_I2C_BUS BUS_I2C1
146 #define RANGEFINDER_I2C_BUS BUS_I2C1
147 #define DEFAULT_I2C_BUS BUS_I2C1
149 #endif
151 #define USE_BARO
152 #define USE_BARO_BMP280
153 #define USE_BARO_MS5611
154 #define USE_BARO_BMP085
155 #define USE_BARO_DPS310
156 #define USE_BARO_SPL06
157 #define BARO_I2C_BUS BUS_I2C1
159 #define USE_MAG
160 #define USE_MAG_ALL
162 #define USE_ADC
163 #define ADC_CHANNEL_1_PIN PC2
164 #define ADC_CHANNEL_2_PIN PC3
165 #define ADC_CHANNEL_3_PIN PC5
167 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
168 #define VBAT_ADC_CHANNEL ADC_CHN_2
169 #define RSSI_ADC_CHANNEL ADC_CHN_3
171 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
173 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_VBAT | FEATURE_BLACKBOX)
174 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
175 #define SERIALRX_UART SERIAL_PORT_USART1
176 #define SERIALRX_PROVIDER SERIALRX_SBUS
178 #define USE_LED_STRIP
179 #define WS2811_PIN PD12 //TIM4_CH1
181 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
183 #define TARGET_IO_PORTA 0xffff
184 #define TARGET_IO_PORTB 0xffff
185 #define TARGET_IO_PORTC 0xffff
186 #define TARGET_IO_PORTD 0xffff
187 #define TARGET_IO_PORTE 0xffff
189 #define MAX_PWM_OUTPUT_PORTS 8
191 // *************** PINIO ***************************
192 #define USE_PINIO
193 #define USE_PINIOBOX
194 #define PINIO1_PIN PC0