vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / KAKUTEH7 / target.h
blob258c7721aa0f1c61507e4ba122c7b19d6b6483dd
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/>.
19 #pragma once
21 #ifdef KAKUTEH7MINI
22 #define TARGET_BOARD_IDENTIFIER "KTH7"
23 #define USBD_PRODUCT_STRING "KAKUTEH7"
24 #else
25 #define TARGET_BOARD_IDENTIFIER "KH7M"
26 #define USBD_PRODUCT_STRING "KAKUTEH7MINI"
28 #endif
30 #define USE_TARGET_CONFIG
32 #define LED0 PC2
34 #define BEEPER PC13
35 #define BEEPER_INVERTED
37 // *************** IMU generic ***********************
42 // *************** SPI1 ****************
43 #define USE_SPI
44 #define USE_SPI_DEVICE_1
45 #define SPI1_SCK_PIN PA5
46 #define SPI1_MISO_PIN PA6
47 #define SPI1_MOSI_PIN PA7
49 #if defined(KAKUTEH7MINI)
51 #define USE_FLASHFS
52 #define USE_FLASH_M25P16
53 #define M25P16_CS_PIN PA4
54 #define M25P16_SPI_BUS BUS_SPI1
56 #define USE_FLASH_W25N01G
57 #define W25N01G_SPI_BUS BUS_SPI1
58 #define W25N01G_CS_PIN PA4
60 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
62 #elif defined(KAKUTEH7V2)
64 #define USE_FLASHFS
65 #define USE_FLASH_W25N01G
66 #define W25N01G_SPI_BUS BUS_SPI1
67 #define W25N01G_CS_PIN PA4
69 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
71 #else
73 //Regular Kakute H7
75 #define USE_SDCARD
76 #define USE_SDCARD_SPI
77 #define SDCARD_SPI_BUS BUS_SPI1
78 #define SDCARD_CS_PIN PA4
79 #define SDCARD_DETECT_INVERTED
80 #define SDCARD_DETECT_PIN PA3
82 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
84 #endif
87 // *************** SPI2 ***********************
88 #define USE_SPI_DEVICE_2
89 #define SPI2_SCK_PIN PB13
90 #define SPI2_MISO_PIN PB14
91 #define SPI2_MOSI_PIN PB15
93 // *************** SPI4 ***************
94 #define USE_SPI_DEVICE_4
95 #define SPI4_SCK_PIN PE2
96 #define SPI4_MISO_PIN PE5
97 #define SPI4_MOSI_PIN PE6
99 //MPU6000
100 #define USE_IMU_MPU6000
101 #define IMU_MPU6000_ALIGN CW270_DEG
102 #define MPU6000_SPI_BUS BUS_SPI4
103 #define MPU6000_CS_PIN PE4
105 //BMI270
106 #define USE_IMU_BMI270
107 #define BMI270_SPI_BUS BUS_SPI4
108 #define BMI270_CS_PIN PE4
110 #ifdef KAKUTEH7MINI
111 #define IMU_BMI270_ALIGN CW270_DEG
112 #else
113 #define IMU_BMI270_ALIGN CW0_DEG
114 #endif
116 #define USE_IMU_ICM42605
117 #define IMU_ICM42605_ALIGN CW270_DEG
118 #define ICM42605_CS_PIN PE4
119 #define ICM42605_SPI_BUS BUS_SPI4
121 #define USE_MAX7456
122 #define MAX7456_SPI_BUS BUS_SPI2
123 #define MAX7456_CS_PIN PB12
125 // *************** I2C /Baro/Mag *********************
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 BARO_I2C_BUS BUS_I2C1
133 #define USE_BARO_BMP280
134 #define USE_BARO_MS5611
135 #define USE_BARO_DPS310
136 #define USE_BARO_SPL06
138 #define USE_MAG
139 #define MAG_I2C_BUS BUS_I2C1
140 #define USE_MAG_ALL
142 #define TEMPERATURE_I2C_BUS BUS_I2C1
143 #define PITOT_I2C_BUS BUS_I2C1
145 #define USE_RANGEFINDER
146 #define RANGEFINDER_I2C_BUS BUS_I2C1
148 // *************** UART *****************************
149 #define USE_VCP
151 #define USE_UART1
152 #define UART1_TX_PIN PA9
153 #define UART1_RX_PIN PA10
155 #define USE_UART2
156 #define UART2_TX_PIN PD5
157 #define UART2_RX_PIN PD6
159 #define USE_UART3
160 #define UART3_TX_PIN PD8
161 #define UART3_RX_PIN PD9
163 #define USE_UART4
164 #define UART4_TX_PIN PD1
165 #define UART4_RX_PIN PD0
167 #define USE_UART6
168 #define UART6_TX_PIN PC6
169 #define UART6_RX_PIN PC7
171 #define USE_UART7
172 #define UART7_RX_PIN PE7
174 #define SERIAL_PORT_COUNT 7
176 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
177 #define SERIALRX_PROVIDER SERIALRX_SBUS
178 #define SERIALRX_UART SERIAL_PORT_USART1
180 // *************** ADC *****************************
181 #define USE_ADC
182 #define ADC_INSTANCE ADC1
184 #define ADC_CHANNEL_1_PIN PC0
185 #define ADC_CHANNEL_2_PIN PC5
186 #define ADC_CHANNEL_3_PIN PC1
188 #define VBAT_ADC_CHANNEL ADC_CHN_1
189 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
190 #define RSSI_ADC_CHANNEL ADC_CHN_2
192 // *************** PINIO ***************************
193 #define USE_PINIO
194 #define USE_PINIOBOX
196 #ifdef KAKUTEH7MINI
197 #define PINIO1_PIN PB11
198 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
200 #elif defined(KAKUTEH7V2)
202 #define PINIO1_PIN PE13
203 #define PINIO2_PIN PB11
204 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
205 #define PINIO2_FLAGS PINIO_FLAGS_INVERTED
207 #else
208 #define PINIO1_PIN PE13
209 #endif
211 // *************** LEDSTRIP ************************
212 #define USE_LED_STRIP
213 #define WS2811_PIN PD12
215 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
216 #define CURRENT_METER_SCALE 250
218 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
220 #define TARGET_IO_PORTA 0xffff
221 #define TARGET_IO_PORTB 0xffff
222 #define TARGET_IO_PORTC 0xffff
223 #define TARGET_IO_PORTD 0xffff
224 #define TARGET_IO_PORTE 0xffff
226 #define MAX_PWM_OUTPUT_PORTS 8
227 #define USE_DSHOT
228 #define USE_ESC_SENSOR