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/>.
21 #define TARGET_BOARD_IDENTIFIER "KH7W"
22 #define USBD_PRODUCT_STRING "KAKUTEH7WING"
24 #define USE_HARDWARE_PREBOOT_SETUP
26 #define USE_TARGET_CONFIG
32 #define BEEPER_INVERTED
34 // *************** IMU generic ***********************
35 // #define USE_DUAL_GYRO
36 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
38 // *************** SPI1 IMU0 BMI088 ******************
40 #define USE_SPI_DEVICE_1
41 #define SPI1_SCK_PIN PA5
42 #define SPI1_MISO_PIN PA6
43 #define SPI1_MOSI_PIN PA7
45 #define USE_IMU_BMI088
47 #define IMU_BMI088_ALIGN CW0_DEG
48 #define BMI088_SPI_BUS BUS_SPI1
50 #define BMI088_GYRO_CS_PIN PC9
51 #define BMI088_GYRO_EXTI_PIN PD10
52 #define BMI088_ACC_CS_PIN PC8
53 #define BMI088_ACC_EXTI_PIN PD11
55 // *************** SPI3 IMU1 ICM42688 ************
56 #define USE_SPI_DEVICE_3
57 #define SPI3_SCK_PIN PC10
58 #define SPI3_MISO_PIN PC11
59 #define SPI3_MOSI_PIN PC12
61 #define USE_IMU_ICM42605
62 #define IMU_ICM42605_ALIGN CW90_DEG
63 #define ICM42605_SPI_BUS BUS_SPI3
64 #define ICM42605_CS_PIN PE12
65 #define ICM42605_EXTI_PIN PE15
67 // *************** SPI2 OSD ***********************
68 #define USE_SPI_DEVICE_2
69 #define SPI2_SCK_PIN PD3
70 #define SPI2_MISO_PIN PC2
71 #define SPI2_MOSI_PIN PC3
74 #define MAX7456_SPI_BUS BUS_SPI2
75 #define MAX7456_CS_PIN PB12
77 // *************** SDIO SD BLACKBOX*******************
79 #define USE_SDCARD_SDIO
80 #define SDCARD_SDIO_DEVICE SDIODEV_2
81 #define SDCARD_SDIO_4BIT
82 #define SDCARD_SDIO_NORMAL_SPEED
83 #define SDCARD_SDIO2_CMD_ALT
85 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
87 // *************** I2C /Baro/Mag *********************
89 #define USE_I2C_DEVICE_1
93 #define USE_I2C_DEVICE_2
97 #define USE_I2C_DEVICE_4
102 #define BARO_I2C_BUS BUS_I2C4
103 #define USE_BARO_BMP280
104 #define USE_BARO_MS5611
105 #define USE_BARO_DPS310
106 #define USE_BARO_SPL06
109 #define MAG_I2C_BUS BUS_I2C1
112 #define TEMPERATURE_I2C_BUS BUS_I2C2
113 #define PITOT_I2C_BUS BUS_I2C2
115 #define USE_RANGEFINDER
116 #define RANGEFINDER_I2C_BUS BUS_I2C2
118 // *************** UART *****************************
120 #define VBUS_SENSING_PIN PA9
121 #define VBUS_SENSING_ENABLED
124 #define UART1_TX_PIN PB6
125 #define UART1_RX_PIN PA10
128 #define UART2_TX_PIN PD5
129 #define UART2_RX_PIN PD6
132 #define UART3_TX_PIN PD8
133 #define UART3_RX_PIN PD9
136 #define UART5_TX_PIN PB13
137 #define UART5_RX_PIN PD2
140 #define UART6_TX_PIN PC6
141 #define UART6_RX_PIN PC7
144 #define UART7_TX_PIN PE8
145 #define UART7_RX_PIN PE7
148 #define UART8_TX_PIN PE1
149 #define UART8_RX_PIN PE0
151 #define SERIAL_PORT_COUNT 8
153 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
154 #define SERIALRX_PROVIDER SERIALRX_SBUS
155 #define SERIALRX_UART SERIAL_PORT_USART6
157 // *************** ADC *****************************
159 #define ADC_INSTANCE ADC1
161 #define ADC_CHANNEL_1_PIN PC5 //VBAT1
162 #define ADC_CHANNEL_2_PIN PC4 //CURR1
163 #define ADC_CHANNEL_3_PIN PC0 //RSSI
164 #define ADC_CHANNEL_5_PIN PA3 //VB2
165 #define ADC_CHANNEL_6_PIN PA2 //CU2
167 #define VBAT_ADC_CHANNEL ADC_CHN_1
168 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
169 #define RSSI_ADC_CHANNEL ADC_CHN_3
171 // *************** PINIO ***************************
174 #define PINIO1_PIN PC13 // VTX power switcher
175 #define PINIO2_PIN PE3 // 2xCamera switcher
176 #define PINIO3_PIN PD4 // User1
177 #define PINIO4_PIN PE4 // User2
179 // *************** LEDSTRIP ************************
180 #define USE_LED_STRIP
181 #define WS2811_PIN PA15
183 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX | FEATURE_GPS)
184 #define CURRENT_METER_SCALE 3660 // 36.6
185 #define VBAT_SCALE_DEFAULT 1818 // 18.18
186 #define VBAT_SCALE_DEFAULT2 1100 // 11.0
188 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
190 #define TARGET_IO_PORTA 0xffff
191 #define TARGET_IO_PORTB 0xffff
192 #define TARGET_IO_PORTC 0xffff
193 #define TARGET_IO_PORTD 0xffff
194 #define TARGET_IO_PORTE 0xffff
196 #define MAX_PWM_OUTPUT_PORTS 14
198 #define USE_ESC_SENSOR