Fix Config (#12448)
[betaflight.git] / src / config / F4BY / config.h
blob37d81a94de2d84b7611c9f59b2efdc7e21f7be2f
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/>.
23 This file has been auto generated from unified-targets repo.
25 The auto generation is transitional only, please remove this comment once the file is edited.
28 #define FC_TARGET_MCU STM32F405
30 #define BOARD_NAME F4BY
31 #define MANUFACTURER_ID FOSS
33 #define USE_GYRO_SPI_MPU6000
34 #define USE_ACC_SPI_MPU6000
35 #define USE_BARO_MS5611
36 #define USE_SDCARD
38 #define BEEPER_PIN PE5
39 #define MOTOR1_PIN PA0
40 #define MOTOR2_PIN PA1
41 #define MOTOR3_PIN PA2
42 #define MOTOR4_PIN PA3
43 #define MOTOR5_PIN PE9
44 #define MOTOR6_PIN PE11
45 #define MOTOR7_PIN PE13
46 #define MOTOR8_PIN PE14
47 #define RX_PWM1_PIN PC9
48 #define RX_PWM2_PIN PC8
49 #define RX_PWM3_PIN PC6
50 #define RX_PWM4_PIN PC7
51 #define RX_PWM5_PIN PD15
52 #define RX_PWM6_PIN PD14
53 #define RX_PWM7_PIN PD13
54 #define RX_PWM8_PIN PD12
55 #define UART1_TX_PIN PB6
56 #define UART2_TX_PIN PD5
57 #define UART3_TX_PIN PD8
58 #define UART4_TX_PIN PC10
59 #define UART6_TX_PIN PC6
60 #define UART1_RX_PIN PB7
61 #define UART2_RX_PIN PD6
62 #define UART3_RX_PIN PD9
63 #define UART4_RX_PIN PC11
64 #define UART6_RX_PIN PC7
65 #define INVERTER6_PIN PD3
66 #define I2C2_SCL_PIN PB10
67 #define I2C2_SDA_PIN PB11
68 #define LED0_PIN PE3
69 #define LED1_PIN PE2
70 #define LED2_PIN PE1
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 ESCSERIAL_PIN PA0
81 #define ADC_VBAT_PIN PC3
82 #define ADC_RSSI_PIN PC1
83 #define ADC_CURR_PIN PC2
84 #define SDCARD_CS_PIN PE15
85 #define GYRO_1_EXTI_PIN PB0
86 #define GYRO_1_CS_PIN PA4
87 #define USB_DETECT_PIN PA9
89 #define TIMER_PIN_MAPPING \
90 TIMER_PIN_MAP( 0, PC9 , 1, 0) \
91 TIMER_PIN_MAP( 1, PC8 , 1, 0) \
92 TIMER_PIN_MAP( 2, PC6 , 1, 0) \
93 TIMER_PIN_MAP( 3, PC7 , 1, 0) \
94 TIMER_PIN_MAP( 4, PD15, 1, -1) \
95 TIMER_PIN_MAP( 5, PD14, 1, 0) \
96 TIMER_PIN_MAP( 6, PD13, 1, 0) \
97 TIMER_PIN_MAP( 7, PD12, 1, 0) \
98 TIMER_PIN_MAP( 8, PA0 , 1, 0) \
99 TIMER_PIN_MAP( 9, PA1 , 1, 0) \
100 TIMER_PIN_MAP(10, PA2 , 2, 0) \
101 TIMER_PIN_MAP(11, PA3 , 2, 0) \
102 TIMER_PIN_MAP(12, PE9 , 1, 0) \
103 TIMER_PIN_MAP(13, PE11, 1, 0) \
104 TIMER_PIN_MAP(14, PE13, 1, 0) \
105 TIMER_PIN_MAP(15, PE14, 1, 0) \
106 TIMER_PIN_MAP(16, PE6 , 1, -1)
110 #define SPI2_TX_DMA_OPT 0
111 #define ADC1_DMA_OPT 1
113 //TODO #define MAG_BUSTYPE I2C
114 #define MAG_I2C_INSTANCE (I2CDEV_2)
115 //TODO #define BARO_BUSTYPE I2C
116 #define BARO_I2C_INSTANCE (I2CDEV_2)
117 //TODO #define BLACKBOX_DEVICE SDCARD
118 //TODO #define BATTERY_METER ADC
119 #define USE_SDCARD_SPI
120 #define SDCARD_SPI_INSTANCE SPI2
121 #define SYSTEM_HSE_MHZ 8
122 //TODO #define DASHBOARD_I2C_BUS 2
123 #define USE_SPI_GYRO
124 #define GYRO_1_SPI_INSTANCE SPI1
125 #define GYRO_1_ALIGN CW90_DEG
126 #define GYRO_1_ALIGN_YAW 900