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/>.
22 #define TARGET_BOARD_IDENTIFIER "KTH7"
23 #define USBD_PRODUCT_STRING "KAKUTEH7"
25 #define TARGET_BOARD_IDENTIFIER "KH7M"
26 #define USBD_PRODUCT_STRING "KAKUTEH7MINI"
30 #define USE_TARGET_CONFIG
35 #define BEEPER_INVERTED
37 // *************** IMU generic ***********************
40 #define USE_MPU_DATA_READY_SIGNAL
43 // *************** SPI1 ****************
45 #define USE_SPI_DEVICE_1
46 #define SPI1_SCK_PIN PA5
47 #define SPI1_MISO_PIN PA6
48 #define SPI1_MOSI_PIN PA7
50 #if defined(KAKUTEH7MINI)
53 #define USE_FLASH_M25P16
54 #define M25P16_CS_PIN PA4
55 #define M25P16_SPI_BUS BUS_SPI1
57 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
59 #elif defined(KAKUTEH7V2)
62 #define USE_FLASH_W25N01G
63 #define W25N01G_SPI_BUS BUS_SPI1
64 #define W25N01G_CS_PIN PA4
66 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
73 #define USE_SDCARD_SPI
74 #define SDCARD_SPI_BUS BUS_SPI1
75 #define SDCARD_CS_PIN PA4
76 #define SDCARD_DETECT_INVERTED
77 #define SDCARD_DETECT_PIN PA3
79 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
84 // *************** SPI2 ***********************
85 #define USE_SPI_DEVICE_2
86 #define SPI2_SCK_PIN PB13
87 #define SPI2_MISO_PIN PB14
88 #define SPI2_MOSI_PIN PB15
90 // *************** SPI4 ***************
91 #define USE_SPI_DEVICE_4
92 #define SPI4_SCK_PIN PE2
93 #define SPI4_MISO_PIN PE5
94 #define SPI4_MOSI_PIN PE6
97 #define USE_IMU_MPU6000
98 #define IMU_MPU6000_ALIGN CW270_DEG
99 #define MPU6000_SPI_BUS BUS_SPI4
100 #define MPU6000_CS_PIN PE4
101 #define MPU6000_EXTI_PIN PE1
104 #define USE_IMU_BMI270
105 #define IMU_BMI270_ALIGN CW0_DEG
106 #define BMI270_SPI_BUS BUS_SPI4
107 #define BMI270_CS_PIN PE4
108 #define BMI270_EXTI_PIN PE1
111 #define MAX7456_SPI_BUS BUS_SPI2
112 #define MAX7456_CS_PIN PB12
114 // *************** I2C /Baro/Mag *********************
116 #define USE_I2C_DEVICE_1
121 #define BARO_I2C_BUS BUS_I2C1
122 #define USE_BARO_BMP280
123 #define USE_BARO_MS5611
124 #define USE_BARO_DPS310
125 #define USE_BARO_SPL06
128 #define MAG_I2C_BUS BUS_I2C1
129 #define USE_MAG_HMC5883
130 #define USE_MAG_QMC5883
131 #define USE_MAG_IST8310
132 #define USE_MAG_IST8308
133 #define USE_MAG_MAG3110
134 #define USE_MAG_LIS3MDL
135 #define USE_MAG_VCM5883
137 #define TEMPERATURE_I2C_BUS BUS_I2C1
138 #define BNO055_I2C_BUS BUS_I2C1
139 #define PITOT_I2C_BUS BUS_I2C1
141 #define USE_RANGEFINDER
142 #define RANGEFINDER_I2C_BUS BUS_I2C1
144 // *************** UART *****************************
148 #define UART1_TX_PIN PA9
149 #define UART1_RX_PIN PA10
152 #define UART2_TX_PIN PD5
153 #define UART2_RX_PIN PD6
156 #define UART3_TX_PIN PD8
157 #define UART3_RX_PIN PD9
160 #define UART4_TX_PIN PD1
161 #define UART4_RX_PIN PD0
164 #define UART6_TX_PIN PC6
165 #define UART6_RX_PIN PC7
168 #define UART7_RX_PIN PE7
170 #define SERIAL_PORT_COUNT 7
172 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
173 #define SERIALRX_PROVIDER SERIALRX_SBUS
174 #define SERIALRX_UART SERIAL_PORT_USART1
176 // *************** ADC *****************************
178 #define ADC_INSTANCE ADC1
180 #define ADC_CHANNEL_1_PIN PC0
181 #define ADC_CHANNEL_2_PIN PC5
182 #define ADC_CHANNEL_3_PIN PC1
184 #define VBAT_ADC_CHANNEL ADC_CHN_1
185 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
186 #define RSSI_ADC_CHANNEL ADC_CHN_2
188 // *************** PINIO ***************************
193 #define PINIO1_PIN PB11
194 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
196 #elif defined(KAKUTEH7V2)
198 #define PINIO1_PIN PE13
199 #define PINIO2_PIN PB11
200 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
203 #define PINIO1_PIN PE13
206 // *************** LEDSTRIP ************************
207 #define USE_LED_STRIP
208 #define WS2811_PIN PD12
210 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
211 #define CURRENT_METER_SCALE 250
213 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
215 #define TARGET_IO_PORTA 0xffff
216 #define TARGET_IO_PORTB 0xffff
217 #define TARGET_IO_PORTC 0xffff
218 #define TARGET_IO_PORTD 0xffff
219 #define TARGET_IO_PORTE 0xffff
221 #define MAX_PWM_OUTPUT_PORTS 8
223 #define USE_ESC_SENSOR