Blackbox device type 'file' (SITL) considered working when file handler is available
[inav.git] / src / main / target / KAKUTEF7 / target.h
blobf3f4edfed40863d21f608d190fef6885b3af1494
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 KAKUTEF7MINI
24 #define TARGET_BOARD_IDENTIFIER "KF7M"
25 #define USBD_PRODUCT_STRING "KakuteF7-Mini"
26 #else
27 #define TARGET_BOARD_IDENTIFIER "KTF7"
28 #define USBD_PRODUCT_STRING "KakuteF7"
29 #endif
31 #define LED0 PA2
33 #define BEEPER PD15
34 #define BEEPER_INVERTED
36 #define USE_DSHOT
37 #define USE_ESC_SENSOR
41 // ICM-20689
42 #define USE_IMU_ICM20689
43 #define IMU_ICM20689_ALIGN CW270_DEG
44 #define ICM20689_CS_PIN SPI4_NSS_PIN
45 #define ICM20689_SPI_BUS BUS_SPI4
47 #define USE_IMU_MPU6000
48 #define IMU_MPU6000_ALIGN CW270_DEG
49 #define MPU6000_CS_PIN SPI4_NSS_PIN
50 #define MPU6000_SPI_BUS BUS_SPI4
53 #define USB_IO
54 #define USE_VCP
55 #define VBUS_SENSING_ENABLED
56 #define VBUS_SENSING_PIN PA8
58 #define USE_UART1
59 #define UART1_TX_PIN PA9
60 #define UART1_RX_PIN PA10
62 #define USE_UART2
63 #define UART2_TX_PIN PD5
64 #define UART2_RX_PIN PD6
66 #define USE_UART3
67 #define UART3_TX_PIN PB10
68 #define UART3_RX_PIN PB11
70 #define USE_UART4
71 #define UART4_TX_PIN PA0
72 #define UART4_RX_PIN PA1
74 #define USE_UART6
75 #define UART6_TX_PIN PC6
76 #define UART6_RX_PIN PC7
78 #define USE_UART7
79 #define UART7_TX_PIN NONE
80 #define UART7_RX_PIN PE7
82 #define SERIAL_PORT_COUNT 7 //VCP,UART1,UART2,UART3,UART4,UART6,UART7
84 #define USE_SPI
85 #define USE_SPI_DEVICE_1 //SD Card
86 #define USE_SPI_DEVICE_2 //OSD
87 #define USE_SPI_DEVICE_4 //ICM20689
89 #define SPI1_NSS_PIN PA4
90 #define SPI1_SCK_PIN PA5
91 #define SPI1_MISO_PIN PA6
92 #define SPI1_MOSI_PIN PA7
94 #define SPI2_NSS_PIN PB12
95 #define SPI2_SCK_PIN PB13
96 #define SPI2_MISO_PIN PB14
97 #define SPI2_MOSI_PIN PB15
99 #define SPI4_NSS_PIN PE4
100 #define SPI4_SCK_PIN PE2
101 #define SPI4_MISO_PIN PE5
102 #define SPI4_MOSI_PIN PE6
105 #ifndef KAKUTEF7HDV
106 #define USE_MAX7456
107 #define MAX7456_SPI_BUS BUS_SPI2
108 #define MAX7456_CS_PIN SPI2_NSS_PIN
109 #endif
111 #if defined(KAKUTEF7MINI)
112 #define M25P16_CS_PIN SPI1_NSS_PIN
113 #define M25P16_SPI_BUS BUS_SPI1
114 #define USE_FLASHFS
115 #define USE_FLASH_M25P16
116 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
117 #else
118 #define USE_SDCARD
119 #define USE_SDCARD_SPI
120 #define SDCARD_SPI_BUS BUS_SPI1
121 #define SDCARD_CS_PIN SPI1_NSS_PIN
122 #define SDCARD_DETECT_INVERTED
123 #define SDCARD_DETECT_PIN PD8
124 #endif
126 #define USE_I2C
127 #define USE_I2C_DEVICE_1
128 #define I2C1_SCL PB6
129 #define I2C1_SDA PB7
131 #define USE_BARO
132 #define USE_BARO_BMP280
133 #define USE_BARO_MS5611
134 #define BARO_I2C_BUS BUS_I2C1
136 #define USE_MAG
137 #define MAG_I2C_BUS BUS_I2C1
138 #define USE_MAG_ALL
140 #define TEMPERATURE_I2C_BUS BUS_I2C1
142 #define RANGEFINDER_I2C_BUS BUS_I2C1
144 #define USE_ADC
145 #define ADC_CHANNEL_1_PIN PC2
146 #define ADC_CHANNEL_2_PIN PC3
147 #define ADC_CHANNEL_3_PIN PC5
149 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
150 #define VBAT_ADC_CHANNEL ADC_CHN_2
151 #define RSSI_ADC_CHANNEL ADC_CHN_3
153 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
155 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_VBAT | FEATURE_CURRENT_METER | FEATURE_BLACKBOX)
156 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
157 #define SERIALRX_UART SERIAL_PORT_USART6
158 #define SERIALRX_PROVIDER SERIALRX_SBUS
160 #define USE_LED_STRIP
161 #define WS2811_PIN PD12 //TIM4_CH1
163 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
165 #define TARGET_IO_PORTA 0xffff
166 #define TARGET_IO_PORTB 0xffff
167 #define TARGET_IO_PORTC 0xffff
168 #define TARGET_IO_PORTD 0xffff
169 #define TARGET_IO_PORTE 0xffff
171 #define MAX_PWM_OUTPUT_PORTS 6