FIX CONFIG: PIN IO CONFIG, PIN IO BOX (#12467)
[betaflight.git] / src / config / CRAZYBEEF4SX1280 / config.h
blobeb40f6d641bcd816f16f38dc8bdc23a602d4e5a1
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 STM32F411
26 #define BOARD_NAME CRAZYBEEF4SX1280
27 #define MANUFACTURER_ID HAMO
29 #define USE_ACC
30 #define USE_ACC_SPI_ICM20689
31 #define USE_ACC_SPI_MPU6000
32 #define USE_GYRO
33 #define USE_GYRO_SPI_ICM20689
34 #define USE_GYRO_SPI_MPU6000
35 #define USE_ACCGYRO_BMI270
36 #define USE_GYRO_SPI_ICM42688P
37 #define USE_ACC_SPI_ICM42688P
38 #define USE_FLASH_W25Q128FV
39 #define USE_MAX7456
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 TIM3
49 #define RX_EXPRESSLRS_SPI_RESET_PIN PA8
50 #define RX_EXPRESSLRS_SPI_BUSY_PIN PA13
51 #define RX_SPI_CS PA15
52 #define RX_SPI_EXTI PC14
53 #define RX_SPI_BIND PB2
54 #define RX_SPI_LED PB9
56 #define BEEPER_PIN PC15
57 #define MOTOR1_PIN PB10
58 #define MOTOR2_PIN PB6
59 #define MOTOR3_PIN PB7
60 #define MOTOR4_PIN PB8
61 #define RX_PPM_PIN PA3
62 #define RX_PWM1_PIN PA2
63 #define RX_PWM2_PIN PA9
64 #define RX_PWM3_PIN PA10
65 #define LED_STRIP_PIN PA0
66 #define UART1_TX_PIN PA9
67 #define UART2_TX_PIN PA2
68 #define UART1_RX_PIN PA10
69 #define UART2_RX_PIN PA3
70 #define LED0_PIN PC13
71 #define SPI1_SCK_PIN PA5
72 #define SPI2_SCK_PIN PB13
73 #define SPI3_SCK_PIN PB3
74 #define SPI1_MISO_PIN PA6
75 #define SPI2_MISO_PIN PB14
76 #define SPI3_MISO_PIN PB4
77 #define SPI1_MOSI_PIN PA7
78 #define SPI2_MOSI_PIN PB15
79 #define SPI3_MOSI_PIN PB5
80 #define ADC_VBAT_PIN PB0
81 #define ADC_CURR_PIN PB1
82 #define FLASH_CS_PIN PA14
83 #define MAX7456_SPI_CS_PIN PB12
84 #define RX_SPI_CS_PIN PA15
85 #define RX_SPI_EXTI_PIN PC14
86 #define RX_SPI_BIND_PIN PB2
87 #define RX_SPI_LED_PIN PB9
88 #define RX_SPI_EXPRESSLRS_RESET_PIN PA8
89 #define RX_SPI_EXPRESSLRS_BUSY_PIN PA13
90 #define GYRO_1_EXTI_PIN PA1
91 #define GYRO_1_CS_PIN PA4
93 #define TIMER_PIN_MAPPING \
94 TIMER_PIN_MAP( 0, PA3 , 3, -1) \
95 TIMER_PIN_MAP( 1, PB10, 1, 0) \
96 TIMER_PIN_MAP( 2, PB6 , 1, 0) \
97 TIMER_PIN_MAP( 3, PB7 , 1, 0) \
98 TIMER_PIN_MAP( 4, PB8 , 1, 0) \
99 TIMER_PIN_MAP( 5, PA0 , 2, 0) \
100 TIMER_PIN_MAP( 6, PA2 , 3, -1) \
101 TIMER_PIN_MAP( 7, PA9 , 1, 0) \
102 TIMER_PIN_MAP( 8, PA10, 1, 0)
106 #define ADC1_DMA_OPT 0
108 #define RX_SPI_INSTANCE SPI3
109 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH
110 //TODO #define DSHOT_BURST AUTO
111 //TODO #define DSHOT_BITBANG OFF
112 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
113 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
114 #define DEFAULT_CURRENT_METER_SCALE 1175
115 #define BEEPER_INVERTED
116 #define SYSTEM_HSE_MHZ 8
117 #define MAX7456_SPI_INSTANCE SPI2
118 #define PINIO1_BOX 40
119 #define PINIO2_BOX 41
120 #define FLASH_SPI_INSTANCE SPI2
121 #define USE_SPI_GYRO
122 #define GYRO_1_SPI_INSTANCE SPI1
123 #define GYRO_1_ALIGN CW90_DEG
124 #define GYRO_1_ALIGN_YAW 900