FIX CONFIG: MATEKF405TEMINI SPI3 + CONFIG DEFAULT_VOLTAGE_METER_SCALE + SYSTEM_HSE_MH...
[betaflight.git] / src / config / JBF7 / config.h
blob16534953e9f1d5fd07002b9aca0c8fcf48655679
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 STM32F7X2
26 #define BOARD_NAME JBF7
27 #define MANUFACTURER_ID IFRC
29 #define USE_GYRO
30 #define USE_GYRO_SPI_MPU6500
31 #define USE_ACC
32 #define USE_ACC_SPI_MPU6500
33 #define USE_FLASH_M25P16
34 #define USE_BARO_BMP280
35 #define USE_MAX7456
36 #define USE_SDCARD
38 #define BEEPER_PIN PC15
39 #define MOTOR1_PIN PC8
40 #define MOTOR2_PIN PC6
41 #define MOTOR3_PIN PC9
42 #define MOTOR4_PIN PC7
43 #define MOTOR5_PIN PB6
44 #define MOTOR6_PIN PB7
45 #define MOTOR7_PIN PB1
46 #define MOTOR8_PIN PB0
47 #define RX_PPM_PIN PA3
48 #define LED_STRIP_PIN PA1
49 #define UART1_TX_PIN PA9
50 #define UART2_TX_PIN PA2
51 #define UART3_TX_PIN PB10
52 #define UART4_TX_PIN PC10
53 #define UART5_TX_PIN PC12
54 #define UART1_RX_PIN PA10
55 #define UART2_RX_PIN PA3
56 #define UART3_RX_PIN PB11
57 #define UART4_RX_PIN PC11
58 #define UART5_RX_PIN PD2
59 #define I2C2_SCL_PIN PB10
60 #define I2C2_SDA_PIN PB11
61 #define LED0_PIN PC4
62 #define SPI1_SCK_PIN PA5
63 #define SPI2_SCK_PIN PB13
64 #define SPI3_SCK_PIN PB3
65 #define SPI1_MISO_PIN PA6
66 #define SPI2_MISO_PIN PB14
67 #define SPI3_MISO_PIN PB4
68 #define SPI1_MOSI_PIN PA7
69 #define SPI2_MOSI_PIN PB15
70 #define SPI3_MOSI_PIN PB5
71 #define CAMERA_CONTROL_PIN PA0
72 #define ADC_VBAT_PIN PC1
73 #define ADC_RSSI_PIN PC0
74 #define ADC_CURR_PIN PC2
75 #define SDCARD_CS_PIN PA4
76 #define PINIO1_PIN PC13
77 #define PINIO2_PIN PC14
78 #define PINIO3_PIN PB8
79 #define FLASH_CS_PIN PB9
80 #define MAX7456_SPI_CS_PIN PB12
81 #define GYRO_1_EXTI_PIN PA8
82 #define GYRO_2_EXTI_PIN PB2
83 #define GYRO_1_CS_PIN PA15
84 #define GYRO_2_CS_PIN PC3
86 #define TIMER_PIN_MAPPING \
87 TIMER_PIN_MAP( 0, PA0 , 2, 0) \
88 TIMER_PIN_MAP( 1, PA3 , 3, -1) \
89 TIMER_PIN_MAP( 2, PC8 , 2, 1) \
90 TIMER_PIN_MAP( 3, PC6 , 2, 0) \
91 TIMER_PIN_MAP( 4, PC9 , 2, 0) \
92 TIMER_PIN_MAP( 5, PC7 , 2, 1) \
93 TIMER_PIN_MAP( 6, PB6 , 1, 0) \
94 TIMER_PIN_MAP( 7, PB7 , 1, 0) \
95 TIMER_PIN_MAP( 8, PB1 , 2, 0) \
96 TIMER_PIN_MAP( 9, PB0 , 2, 0) \
97 TIMER_PIN_MAP(10, PA1 , 1, 0)
100 #define ADC3_DMA_OPT 0
102 //TODO #define GYRO_TO_USE BOTH
103 //TODO #define MAG_BUSTYPE I2C
104 #define MAG_I2C_INSTANCE (I2CDEV_2)
105 #define USE_BARO
106 #define BARO_I2C_INSTANCE (I2CDEV_2)
108 #define USE_ADC
109 #define ADC_INSTANCE ADC3
110 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD
111 #define ENABLE_DSHOT_DMAR DSHOT_DMAR_ON
112 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ESC
113 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
114 #define DEFAULT_VOLTAGE_METER_SCALE 110
115 #define DEFAULT_CURRENT_METER_SCALE 100
116 #define BEEPER_INVERTED
117 #define USE_SDCARD_SPI
118 #define SDCARD_SPI_INSTANCE SPI3
119 //TODO #define OSD_VBAT_POS 384
120 //TODO #define OSD_RSSI_POS 2426
121 //TODO #define OSD_TIM_1_POS 53
122 //TODO #define OSD_TIM_2_POS 2455
123 //TODO #define OSD_FLYMODE_POS 2420
124 //TODO #define OSD_THROTTLE_POS 2400
125 //TODO #define OSD_VTX_CHANNEL_POS 34
126 //TODO #define OSD_CROSSHAIRS_POS 236
127 //TODO #define OSD_AH_POS 199
128 //TODO #define OSD_CURRENT_POS 2440
129 //TODO #define OSD_MAH_DRAWN_POS 2448
130 //TODO #define OSD_CRAFT_NAME_POS 2048
131 //TODO #define OSD_DISPLAY_NAME_POS 490
132 //TODO #define OSD_GPS_SPEED_POS 271
133 //TODO #define OSD_GPS_LON_POS 82
134 //TODO #define OSD_GPS_LAT_POS 65
135 //TODO #define OSD_GPS_SATS_POS 1410
136 //TODO #define OSD_HOME_DIR_POS 302
137 //TODO #define OSD_HOME_DIST_POS 303
138 //TODO #define OSD_COMPASS_BAR_POS 265
139 //TODO #define OSD_ALTITUDE_POS 246
140 //TODO #define OSD_PID_ROLL_POS 135
141 //TODO #define OSD_PID_PITCH_POS 167
142 //TODO #define OSD_PID_YAW_POS 199
143 //TODO #define OSD_DEBUG_POS 0
144 //TODO #define OSD_POWER_POS 320
145 //TODO #define OSD_PIDRATE_PROFILE_POS 344
146 //TODO #define OSD_WARNINGS_POS 2406
147 //TODO #define OSD_AVG_CELL_VOLTAGE_POS 2432
148 //TODO #define OSD_PIT_ANG_POS 256
149 //TODO #define OSD_ROL_ANG_POS 288
150 //TODO #define OSD_BATTERY_USAGE_POS 391
151 //TODO #define OSD_DISARMED_POS 75
152 //TODO #define OSD_NHEADING_POS 310
153 //TODO #define OSD_NVARIO_POS 278
154 //TODO #define OSD_ESC_TMP_POS 82
155 //TODO #define OSD_ESC_RPM_POS 83
156 //TODO #define OSD_STAT_MAX_SPD OFF
157 #define MAX7456_SPI_INSTANCE SPI2
158 //TODO #define PINIO_CONFIG 129,1,1,1
159 //TODO #define PINIO_BOX 0,255,255,255
160 #define FLASH_SPI_INSTANCE SPI3
161 #define USE_SPI_GYRO
162 #define GYRO_1_SPI_INSTANCE SPI1
163 #define GYRO_2_SPI_INSTANCE SPI1
164 #define GYRO_2_ALIGN CW90_DEG
165 #define GYRO_2_ALIGN_YAW 900