CONFIG: Fix SDCARD CS (#12488)
[betaflight.git] / src / config / ALIENFLIGHTNGF7_ELRS / config.h
blob20aef3f231c604797e19593b3d1d25054dfcbf9c
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 ALIENFLIGHTNGF7_ELRS
27 #define MANUFACTURER_ID AFNG
29 #define USE_GYRO
30 #define USE_GYRO_SPI_MPU9250
31 #define USE_ACC
32 #define USE_ACC_SPI_MPU9250
33 #define USE_GYRO_SPI_MPU6500
34 #define USE_ACC_SPI_MPU6500
35 #define USE_GYRO_SPI_ICM20602
36 #define USE_ACC_SPI_ICM20602
37 #define USE_MAG_SPI_AK8963
38 #define USE_MAX7456
39 #define USE_SDCARD
40 #define USE_RX_SPI
41 #define USE_RX_EXPRESSLRS
42 #define USE_RX_EXPRESSLRS_TELEMETRY
43 #define USE_RX_SX1280
44 #define RX_CHANNELS_AETR
45 #define RX_SPI_DEFAULT_PROTOCOL RX_SPI_EXPRESSLRS
46 #define DEFAULT_RX_FEATURE FEATURE_RX_SPI
47 #define RX_SPI_PROTOCOL EXPRESSLRS
48 #define RX_EXPRESSLRS_TIMER_INSTANCE TIM5
49 #define RX_EXPRESSLRS_SPI_RESET_PIN PB6
50 #define RX_EXPRESSLRS_SPI_BUSY_PIN PB7
51 #define RX_SPI_CS PA15
52 #define RX_SPI_EXTI PB15
53 #define RX_SPI_BIND PB2
54 #define RX_SPI_LED PB9
56 #define BEEPER_PIN PC13
57 #define MOTOR1_PIN PC6
58 #define MOTOR2_PIN PC7
59 #define MOTOR3_PIN PB14
60 #define MOTOR4_PIN PB0
61 #define MOTOR5_PIN PA0
62 #define MOTOR6_PIN PC8
63 #define MOTOR7_PIN PA1
64 #define MOTOR8_PIN PC9
65 #define RX_PPM_PIN PA8
66 #define LED_STRIP_PIN PA8
67 #define UART1_TX_PIN PA9
68 #define UART2_TX_PIN PA2
69 #define UART4_TX_PIN PC10
70 #define UART1_RX_PIN PA10
71 #define UART2_RX_PIN PA3
72 #define UART4_RX_PIN PC11
73 #define LED0_PIN PC12
74 #define LED1_PIN PD2
75 #define SPI1_SCK_PIN PA5
76 #define SPI2_SCK_PIN PB13
77 #define SPI3_SCK_PIN PB3
78 #define SPI1_SDI_PIN PA6
79 #define SPI2_SDI_PIN PC2
80 #define SPI3_SDI_PIN PB4
81 #define SPI1_SDO_PIN PA7
82 #define SPI2_SDO_PIN PC3
83 #define SPI3_SDO_PIN PB5
84 #define ADC_VBAT_PIN PC0
85 #define ADC_RSSI_PIN PC4
86 #define ADC_CURR_PIN PC1
87 #define SDCARD_SPI_CS_PIN PB10
88 #define SDCARD_DETECT_PIN PB11
89 #define MAX7456_SPI_CS_PIN PB12
90 #define RX_SPI_CS_PIN PA15
91 #define RX_SPI_EXTI_PIN PB15
92 #define RX_SPI_BIND_PIN PB2
93 #define RX_SPI_LED_PIN PB9
94 #define RX_SPI_EXPRESSLRS_RESET_PIN PB6
95 #define RX_SPI_EXPRESSLRS_BUSY_PIN PB7
96 #define GYRO_1_EXTI_PIN PC14
97 #define GYRO_1_CS_PIN PA4
99 #define TIMER_PIN_MAPPING \
100 TIMER_PIN_MAP( 0, PA8 , 1, 1) \
101 TIMER_PIN_MAP( 1, PC6 , 2, 0) \
102 TIMER_PIN_MAP( 2, PC7 , 1, 0) \
103 TIMER_PIN_MAP( 3, PB14, 2, 1) \
104 TIMER_PIN_MAP( 4, PB0 , 2, 0) \
105 TIMER_PIN_MAP( 5, PA0 , 2, 0) \
106 TIMER_PIN_MAP( 6, PC8 , 2, 1) \
107 TIMER_PIN_MAP( 7, PA1 , 2, 0) \
108 TIMER_PIN_MAP( 8, PC9 , 2, 0)
112 #define ADC1_DMA_OPT 0
114 //TODO #define RX_SPI_PROTOCOL RX_SPI_EXPRESSLRS
115 #define RX_SPI_INSTANCE SPI3
116 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD
117 #define DEFAULT_DSHOT_BURST DSHOT_DMAR_ON
118 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
119 #define BEEPER_INVERTED
120 #define SDCARD_DETECT_INVERTED
121 #define USE_SDCARD_SPI
122 #define SDCARD_SPI_INSTANCE SPI2
123 #define MAX7456_SPI_INSTANCE SPI3
124 #define USE_SPI_GYRO
125 #define GYRO_1_SPI_INSTANCE SPI1
126 #define GYRO_1_ALIGN CW270_DEG
127 #define GYRO_1_ALIGN_YAW 2700
128 //TODO #define EXPRESSLRS_DOMAIN ISM2400