FIX CONFIG: MATEKF405TEMINI SPI3 + CONFIG DEFAULT_VOLTAGE_METER_SCALE + SYSTEM_HSE_MH...
[betaflight.git] / src / config / KAKUTEH7V2 / config.h
blobf99900ccb1a580f8b27f381120f451b9cfceab78
1 /*
2 * This file is part of Betaflight.
4 * Betaflight is free software. You can redistribute this software
5 * and/or modify this software under the terms of the GNU General
6 * Public License as published by the Free Software Foundation,
7 * either version 3 of the License, or (at your option) any later
8 * version.
10 * Betaflight is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this software.
19 * If not, see <http://www.gnu.org/licenses/>.
22 #pragma once
24 #define FC_TARGET_MCU STM32H743
26 #define BOARD_NAME KAKUTEH7V2
27 #define MANUFACTURER_ID HBRO
29 #define USE_GYRO
30 #define USE_ACC
31 #define USE_ACCGYRO_BMI270
32 #define USE_BARO_BMP280
33 #define USE_FLASH_W25N01G
34 #define USE_MAX7456
36 #define BEEPER_PIN PC13
37 #define MOTOR1_PIN PB0
38 #define MOTOR2_PIN PB1
39 #define MOTOR3_PIN PB3
40 #define MOTOR4_PIN PB10
41 #define MOTOR5_PIN PA0
42 #define MOTOR6_PIN PA2
43 #define MOTOR7_PIN PC8
44 #define MOTOR8_PIN PC9
45 #define LED_STRIP_PIN PD12
46 #define UART1_TX_PIN PA9
47 #define UART2_TX_PIN PD5
48 #define UART3_TX_PIN PD8
49 #define UART4_TX_PIN PD1
50 #define UART6_TX_PIN PC6
51 #define UART1_RX_PIN PA10
52 #define UART2_RX_PIN PD6
53 #define UART3_RX_PIN PD9
54 #define UART4_RX_PIN PD0
55 #define UART6_RX_PIN PC7
56 #define UART7_RX_PIN PE7
57 #define I2C1_SCL_PIN PB6
58 #define I2C1_SDA_PIN PB7
59 #define LED0_PIN PC2
60 #define SPI1_SCK_PIN PA5
61 #define SPI2_SCK_PIN PB13
62 #define SPI4_SCK_PIN PE2
63 #define SPI1_MISO_PIN PA6
64 #define SPI2_MISO_PIN PB14
65 #define SPI4_MISO_PIN PE5
66 #define SPI1_MOSI_PIN PA7
67 #define SPI2_MOSI_PIN PB15
68 #define SPI4_MOSI_PIN PE6
69 #define CAMERA_CONTROL_PIN PE9
70 #define ADC_VBAT_PIN PC0
71 #define ADC_RSSI_PIN PC5
72 #define ADC_CURR_PIN PC1
73 #define FLASH_CS_PIN PA4
74 #define PINIO1_PIN PE13
75 #define PINIO2_PIN PB11
76 #define MAX7456_SPI_CS_PIN PB12
77 #define GYRO_1_EXTI_PIN PE1
78 #define GYRO_1_CS_PIN PE4
79 #define USB_DETECT_PIN PA8
81 #define TIMER_PIN_MAPPING \
82 TIMER_PIN_MAP( 0, PB0 , 2, 0) \
83 TIMER_PIN_MAP( 1, PB1 , 2, 1) \
84 TIMER_PIN_MAP( 2, PB3 , 1, 2) \
85 TIMER_PIN_MAP( 3, PB10, 1, 3) \
86 TIMER_PIN_MAP( 4, PA0 , 2, 4) \
87 TIMER_PIN_MAP( 5, PA2 , 2, 5) \
88 TIMER_PIN_MAP( 6, PC8 , 2, 6) \
89 TIMER_PIN_MAP( 7, PC9 , 2, 7) \
90 TIMER_PIN_MAP( 8, PD12, 1, 14) \
91 TIMER_PIN_MAP( 9, PE9 , 1, 12)
94 #define SPI1_TX_DMA_OPT 13
95 #define ADC1_DMA_OPT 8
96 #define ADC3_DMA_OPT 9
97 #define TIMUP1_DMA_OPT 0
98 #define TIMUP2_DMA_OPT 0
99 #define TIMUP3_DMA_OPT 2
100 #define TIMUP4_DMA_OPT 0
101 #define TIMUP5_DMA_OPT 0
102 #define TIMUP8_DMA_OPT 1
104 //TODO #define MAG_BUSTYPE I2C
105 #define MAG_I2C_INSTANCE (I2CDEV_1)
106 #define USE_BARO
107 #define BARO_I2C_INSTANCE (I2CDEV_1)
109 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH
110 //TODO #define SDCARD_MODE OFF
111 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
112 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
113 #define DEFAULT_VOLTAGE_METER_SCALE 109
114 #define DEFAULT_CURRENT_METER_SCALE 168
115 #define BEEPER_INVERTED
116 #define FLASH_SPI_INSTANCE SPI1
117 #define MAX7456_SPI_INSTANCE SPI2
118 //TODO #define DASHBOARD_I2C_BUS 1
119 //TODO #define PINIO_CONFIG 129,129,1,1
120 //TODO #define PINIO_BOX 0,40,255,255
121 #define USE_SPI_GYRO
122 #define GYRO_1_SPI_INSTANCE SPI4