CONFIG: Fix SDCARD CS (#12488)
[betaflight.git] / src / config / AIRBOTF4SD / config.h
blob871b272210bd357513725836f2873930d5e7ecf7
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 STM32F405
26 #define BOARD_NAME AIRBOTF4SD
27 #define MANUFACTURER_ID AIRB
29 #define USE_ACC
30 #define USE_ACC_SPI_MPU6500
31 #define USE_GYRO
32 #define USE_GYRO_SPI_MPU6500
33 #define USE_ACC_SPI_MPU6000
34 #define USE_GYRO_SPI_MPU6000
35 #define USE_BARO_SPI_BMP280
36 #define USE_MAX7456
37 #define USE_SDCARD
38 #define USE_BARO_BMP280
39 #define USE_BARO_BMP085
40 #define USE_BARO_MS5611
41 #define USE_BARO_SPI_BMP280
43 #define BEEPER_PIN PB4
44 #define MOTOR1_PIN PB0
45 #define MOTOR2_PIN PB1
46 #define MOTOR3_PIN PA3
47 #define MOTOR4_PIN PA2
48 #define MOTOR5_PIN PA1
49 #define MOTOR6_PIN PA8
50 #define RX_PPM_PIN PB14
51 #define RX_PWM1_PIN PB14
52 #define RX_PWM2_PIN PB15
53 #define RX_PWM3_PIN PC6
54 #define RX_PWM4_PIN PC7
55 #define RX_PWM5_PIN PC8
56 #define RX_PWM6_PIN PC9
57 #define LED_STRIP_PIN PB6
58 #define UART1_TX_PIN PA9
59 #define UART3_TX_PIN PB10
60 #define UART4_TX_PIN PA0
61 #define UART6_TX_PIN PC6
62 #define UART1_RX_PIN PA10
63 #define UART3_RX_PIN PB11
64 #define UART4_RX_PIN PA1
65 #define UART6_RX_PIN PC7
66 #define INVERTER_PIN_UART6 PD2
67 #define LED0_PIN PB5
68 #define SPI1_SCK_PIN PA5
69 #define SPI3_SCK_PIN PC10
70 #define SPI1_SDI_PIN PA6
71 #define SPI3_SDI_PIN PC11
72 #define SPI1_SDO_PIN PA7
73 #define SPI3_SDO_PIN PC12
74 #define ESCSERIAL_PIN PB14
75 #define ADC_VBAT_PIN PC2
76 #define ADC_RSSI_PIN PA0
77 #define ADC_CURR_PIN PC1
78 #define BARO_CS_PIN PC13
79 #define SDCARD_SPI_CS_PIN PB3
80 #define SDCARD_DETECT_PIN PC0
81 #define PINIO1_PIN PC8
82 #define GYRO_1_EXTI_PIN PC4
83 #define GYRO_1_CS_PIN PB13
84 #define GYRO_2_CS_PIN PA4
85 #define USB_DETECT_PIN PC5
87 #define TIMER_PIN_MAPPING \
88 TIMER_PIN_MAP( 0, PB14, 3, -1) \
89 TIMER_PIN_MAP( 1, PB15, 3, -1) \
90 TIMER_PIN_MAP( 2, PC6 , 2, 0) \
91 TIMER_PIN_MAP( 3, PC7 , 2, 0) \
92 TIMER_PIN_MAP( 4, PC8 , 2, 0) \
93 TIMER_PIN_MAP( 5, PC9 , 2, 0) \
94 TIMER_PIN_MAP( 6, PB0 , 2, 0) \
95 TIMER_PIN_MAP( 7, PB1 , 2, 0) \
96 TIMER_PIN_MAP( 8, PA3 , 1, 1) \
97 TIMER_PIN_MAP( 9, PA2 , 1, 0) \
98 TIMER_PIN_MAP(10, PA1 , 2, 0) \
99 TIMER_PIN_MAP(11, PA8 , 1, 0) \
100 TIMER_PIN_MAP(12, PB6 , 1, 0)
104 #define SPI3_TX_DMA_OPT 0
105 #define ADC1_DMA_OPT 1
107 //TODO #define MAG_BUSTYPE I2C
108 #define MAG_I2C_INSTANCE (I2CDEV_2)
109 #define USE_BARO
110 #define BARO_SPI_INSTANCE SPI1
111 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD
112 #define BEEPER_INVERTED
113 #define SDCARD_DETECT_INVERTED
114 #define USE_SDCARD_SPI
115 #define SDCARD_SPI_INSTANCE SPI3
116 #define SYSTEM_HSE_MHZ 8
117 #define DASHBOARD_I2C_INSTANCE (I2CDEV_2)
118 #define USE_SPI_GYRO
119 #define GYRO_1_SPI_INSTANCE SPI1
120 #define GYRO_1_ALIGN CW270_DEG
121 #define GYRO_1_ALIGN_YAW 2700
122 #define GYRO_2_SPI_INSTANCE SPI1
123 #define GYRO_2_ALIGN CW270_DEG
124 #define GYRO_2_ALIGN_YAW 2700