FIX CONFIG: MATEKF405TEMINI SPI3 + CONFIG DEFAULT_VOLTAGE_METER_SCALE + SYSTEM_HSE_MH...
[betaflight.git] / src / config / KAKUTEH7MINI / config.h
blobfe6d8fab256164840587045d1946175a3c24cf79
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 KAKUTEH7MINI
27 #define MANUFACTURER_ID HBRO
29 #define USE_GYRO
30 #define USE_GYRO_SPI_MPU6000
31 #define USE_ACC
32 #define USE_ACC_SPI_MPU6000
33 #define USE_ACCGYRO_BMI270
34 #define USE_BARO_BMP280
35 #define USE_FLASH_W25N01G
36 #define USE_FLASH_W25Q128FV
37 #define USE_MAX7456
39 #define BEEPER_PIN PC13
40 #define MOTOR1_PIN PB0
41 #define MOTOR2_PIN PB1
42 #define MOTOR3_PIN PB3
43 #define MOTOR4_PIN PB10
44 #define MOTOR5_PIN PA0
45 #define MOTOR6_PIN PA2
46 #define MOTOR7_PIN PC8
47 #define MOTOR8_PIN PC9
48 #define LED_STRIP_PIN PD12
49 #define UART1_TX_PIN PA9
50 #define UART2_TX_PIN PD5
51 #define UART3_TX_PIN PD8
52 #define UART4_TX_PIN PD1
53 #define UART6_TX_PIN PC6
54 #define UART1_RX_PIN PA10
55 #define UART2_RX_PIN PD6
56 #define UART3_RX_PIN PD9
57 #define UART4_RX_PIN PD0
58 #define UART6_RX_PIN PC7
59 #define UART7_RX_PIN PE7
60 #define I2C1_SCL_PIN PB6
61 #define I2C1_SDA_PIN PB7
62 #define LED0_PIN PC2
63 #define SPI1_SCK_PIN PA5
64 #define SPI2_SCK_PIN PB13
65 #define SPI4_SCK_PIN PE2
66 #define SPI1_MISO_PIN PA6
67 #define SPI2_MISO_PIN PB14
68 #define SPI4_MISO_PIN PE5
69 #define SPI1_MOSI_PIN PA7
70 #define SPI2_MOSI_PIN PB15
71 #define SPI4_MOSI_PIN PE6
72 #define CAMERA_CONTROL_PIN PE9
73 #define ADC_VBAT_PIN PC0
74 #define ADC_RSSI_PIN PC5
75 #define ADC_CURR_PIN PC1
76 #define FLASH_CS_PIN PA4
77 #define PINIO1_PIN PB11
78 #define MAX7456_SPI_CS_PIN PB12
79 #define GYRO_1_EXTI_PIN PE1
80 #define GYRO_1_CS_PIN PE4
81 #define USB_DETECT_PIN PA8
83 #define TIMER_PIN_MAPPING \
84 TIMER_PIN_MAP( 0, PB0 , 2, 0) \
85 TIMER_PIN_MAP( 1, PB1 , 2, 1) \
86 TIMER_PIN_MAP( 2, PB3 , 1, 2) \
87 TIMER_PIN_MAP( 3, PB10, 1, 3) \
88 TIMER_PIN_MAP( 4, PA0 , 2, 4) \
89 TIMER_PIN_MAP( 5, PA2 , 2, 5) \
90 TIMER_PIN_MAP( 6, PC8 , 2, 6) \
91 TIMER_PIN_MAP( 7, PC9 , 2, 7) \
92 TIMER_PIN_MAP( 8, PD12, 1, 14) \
93 TIMER_PIN_MAP( 9, PE9 , 1, 12)
96 #define SPI1_TX_DMA_OPT 13
97 #define ADC1_DMA_OPT 8
98 #define ADC3_DMA_OPT 9
99 #define TIMUP1_DMA_OPT 0
100 #define TIMUP2_DMA_OPT 0
101 #define TIMUP3_DMA_OPT 2
102 #define TIMUP4_DMA_OPT 0
103 #define TIMUP5_DMA_OPT 0
104 #define TIMUP8_DMA_OPT 1
106 //TODO #define MAG_BUSTYPE I2C
107 #define MAG_I2C_INSTANCE (I2CDEV_1)
108 #define USE_BARO
109 #define BARO_I2C_INSTANCE (I2CDEV_1)
111 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH
112 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
113 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
114 #define DEFAULT_VOLTAGE_METER_SCALE 110
115 #define DEFAULT_CURRENT_METER_SCALE 168
116 #define BEEPER_INVERTED
117 //TODO #define SDCARD_MODE OFF
118 #define FLASH_SPI_INSTANCE SPI1
119 #define MAX7456_SPI_INSTANCE SPI2
120 //TODO #define DASHBOARD_I2C_BUS 1
121 //TODO #define PINIO_CONFIG 129,1,1,1
122 //TODO #define PINIO_BOX 40,255,255,255
123 #define USE_SPI_GYRO
124 #define GYRO_1_SPI_INSTANCE SPI4
125 #define GYRO_1_ALIGN CW270_DEG
126 #define GYRO_1_ALIGN_YAW 2700