Update DPS310 driver to support SPL07-003
[inav.git] / src / main / target / KAKUTEF7MINIV3 / target.h
blobbf485ebc82b3c999a1ac1329ccf023e5b2009b9f
1 /*
2 * This file is part of INAV Project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
6 * You can obtain one at http://mozilla.org/MPL/2.0/.
8 * Alternatively, the contents of this file may be used under the terms
9 * of the GNU General Public License Version 3, as described below:
11 * This file is free software: you may copy, redistribute and/or modify
12 * it under the terms of the GNU General Public License as published by the
13 * Free Software Foundation, either version 3 of the License, or (at your
14 * option) any later version.
16 * This file is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
19 * Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see http://www.gnu.org/licenses/.
25 #pragma once
27 #define TARGET_BOARD_IDENTIFIER "K7M3"
28 #define USBD_PRODUCT_STRING "KakuteF7-Mini-V3"
30 #define LED0 PD2
31 #define BEEPER PC8
32 #define BEEPER_INVERTED
35 * Buses
37 #define USE_SPI
38 #define USE_SPI_DEVICE_1
39 #define SPI1_SCK_PIN PA5
40 #define SPI1_MISO_PIN PA6
41 #define SPI1_MOSI_PIN PA7
43 #define USE_SPI_DEVICE_2
44 #define SPI2_SCK_PIN PB13
45 #define SPI2_MISO_PIN PB14
46 #define SPI2_MOSI_PIN PB15
48 #define USE_SPI_DEVICE_3
49 #define SPI3_SCK_PIN PC10
50 #define SPI3_MISO_PIN PC11
51 #define SPI3_MOSI_PIN PC12
53 #define USE_I2C
54 #define USE_I2C_DEVICE_1
55 #define I2C1_SCL PB8
56 #define I2C1_SDA PB9
59 * Serial Ports
61 #define USE_VCP
63 #define USE_UART1
64 #define UART1_TX_PIN PA9
65 #define UART1_RX_PIN PA10
67 #define USE_UART2
68 #define UART2_TX_PIN PA2
69 #define UART2_RX_PIN PA3
71 #define USE_UART3
72 #define UART3_TX_PIN PB10
73 #define UART3_RX_PIN PB11
75 #define USE_UART4
76 #define UART4_TX_PIN PA0
77 #define UART4_RX_PIN PA1
79 #define USE_UART6
80 #define UART6_TX_PIN PC6
81 #define UART6_RX_PIN PC7
83 #define SERIAL_PORT_COUNT 6
85 // MPU6000
86 #define USE_IMU_MPU6000
87 #define IMU_MPU6000_ALIGN CW270_DEG
88 #define MPU6000_SPI_BUS BUS_SPI1
89 #define MPU6000_CS_PIN PB2
91 // ICM42688
92 #define USE_IMU_ICM42605
93 #define IMU_ICM42605_ALIGN CW270_DEG
94 #define ICM42605_SPI_BUS BUS_SPI1
95 #define ICM42605_CS_PIN PB2
96 #define ICM42605_EXTI_PIN PA4
99 * Blackbox Onboard Flash
101 #define USE_FLASHFS
102 #define USE_FLASH_M25P16
103 #define M25P16_CS_PIN PB12
104 #define M25P16_SPI_BUS BUS_SPI2
107 * OSD
109 #define USE_MAX7456
110 #define MAX7456_SPI_BUS BUS_SPI3
111 #define MAX7456_CS_PIN PA15
114 * Baro
116 #define USE_BARO
117 #define BARO_I2C_BUS BUS_I2C1
118 #define USE_BARO_BMP280
119 #define USE_BARO_MS5611
122 * Mag
124 #define USE_MAG
125 #define MAG_I2C_BUS BUS_I2C1
126 #define USE_MAG_ALL
129 * ADC
131 #define USE_ADC
132 #define ADC_CHANNEL_1_PIN PC0
133 #define ADC_CHANNEL_2_PIN PC1
134 #define ADC_CHANNEL_3_PIN PC2
136 #define VBAT_ADC_CHANNEL ADC_CHN_1
137 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
138 #define RSSI_ADC_CHANNEL ADC_CHN_3
141 * LED Strip
143 #define USE_LED_STRIP
144 #define WS2811_PIN PA8
147 * Defaults
149 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
150 #define SERIALRX_UART SERIAL_PORT_USART1
151 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
152 #define SERIALRX_PROVIDER SERIALRX_SBUS
153 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
155 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
156 #define MAX_PWM_OUTPUT_PORTS 6
157 #define USE_DSHOT
158 #define USE_ESC_SENSOR
160 #define USE_RANGEFINDER
161 #define RANGEFINDER_I2C_BUS BUS_I2C1
162 #define TEMPERATURE_I2C_BUS BUS_I2C1
163 #define PITOT_I2C_BUS BUS_I2C1
165 /*** Used pins ***/
166 #define TARGET_IO_PORTA 0xffff
167 #define TARGET_IO_PORTB 0xffff
168 #define TARGET_IO_PORTC 0xffff
169 #define TARGET_IO_PORTD (BIT(2))