CONFIG: Fix SDCARD CS (#12488)
[betaflight.git] / src / config / BLUEJAYF4 / config.h
blobb05bbf21d80a0137b8a732f818ccfa8f6be4f36d
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 BLUEJAYF4
27 #define MANUFACTURER_ID BKMN
29 #define USE_GYRO
30 #define USE_GYRO_SPI_MPU6500
31 #define USE_ACC
32 #define USE_ACC_SPI_MPU6500
33 #define USE_FLASH_W25P16
35 #define BEEPER_PIN PC1
36 #define MOTOR1_PIN PA0
37 #define MOTOR2_PIN PA1
38 #define MOTOR3_PIN PA2
39 #define MOTOR4_PIN PA3
40 #define MOTOR5_PIN PB0
41 #define MOTOR6_PIN PB1
42 #define RX_PPM_PIN PC7
43 #define LED_STRIP_PIN PB0
44 #define UART1_TX_PIN PA9
45 #define UART3_TX_PIN PB10
46 #define UART6_TX_PIN PC6
47 #define UART11_TX_PIN PB3
48 #define UART1_RX_PIN PA10
49 #define UART3_RX_PIN PB11
50 #define UART6_RX_PIN PC7
51 #define INVERTER_PIN_UART6 PB15
52 #define I2C1_SCL_PIN PB8
53 #define I2C1_SDA_PIN PB9
54 #define LED0_PIN PB6
55 #define LED1_PIN PB5
56 #define LED2_PIN PB4
57 #define SPI1_SCK_PIN PA5
58 #define SPI3_SCK_PIN PC10
59 #define SPI1_SDI_PIN PA6
60 #define SPI3_SDI_PIN PC11
61 #define SPI1_SDO_PIN PA7
62 #define SPI3_SDO_PIN PC12
63 #define ESCSERIAL_PIN PC7
64 #define ADC_VBAT_PIN PC3
65 #define ADC_CURR_PIN PC2
66 #define SDCARD_SPI_CS_PIN PA15
67 #define SDCARD_DETECT_PIN PD2
68 #define FLASH_CS_PIN PB7
69 #define GYRO_1_EXTI_PIN PC5
70 #define GYRO_1_CS_PIN PC4
72 #define TIMER_PIN_MAPPING \
73 TIMER_PIN_MAP( 0, PC7 , 1, 0) \
74 TIMER_PIN_MAP( 1, PA0 , 2, 0) \
75 TIMER_PIN_MAP( 2, PA1 , 2, 0) \
76 TIMER_PIN_MAP( 3, PA2 , 2, 0) \
77 TIMER_PIN_MAP( 4, PA3 , 2, 1) \
78 TIMER_PIN_MAP( 5, PB0 , 1, 0) \
79 TIMER_PIN_MAP( 6, PB1 , 3, 0) \
80 TIMER_PIN_MAP( 7, PB3 , 1, 0)
84 #define SPI3_TX_DMA_OPT 0
85 #define ADC1_DMA_OPT 1
87 //TODO #define MAG_BUSTYPE I2C
88 #define MAG_I2C_INSTANCE (I2CDEV_1)
89 #define USE_BARO
90 #define BARO_I2C_INSTANCE (I2CDEV_1)
91 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD
92 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
93 #define BEEPER_INVERTED
94 #define SDCARD_DETECT_INVERTED
95 #define USE_SDCARD_SPI
96 #define SDCARD_SPI_INSTANCE SPI3
97 #define SYSTEM_HSE_MHZ 8
98 #define DASHBOARD_I2C_INSTANCE (I2CDEV_1)
99 #define FLASH_SPI_INSTANCE SPI3
100 #define USE_SPI_GYRO
101 #define GYRO_1_SPI_INSTANCE SPI1