Create release.yml
[betaflight.git] / src / main / target / SPEEDYBEEF7 / target.h
blob3806188b87a547e5b182f368117d01bac39428c1
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #pragma once
23 #define TARGET_BOARD_IDENTIFIER "SBF7"
24 #define USBD_PRODUCT_STRING "SpeedyBeeF7"
25 #define USE_TARGET_CONFIG
27 #define LED0_PIN PC14
29 #define USE_BEEPER
30 #define BEEPER_PIN PC13
31 #define BEEPER_INVERTED
33 #define ENABLE_DSHOT_DMAR DSHOT_DMAR_ON
35 // *************** Gyro & ACC **********************
36 #define USE_SPI
37 #define USE_SPI_DEVICE_1
39 #define SPI1_SCK_PIN PA5
40 #define SPI1_MISO_PIN PA6
41 #define SPI1_MOSI_PIN PA7
43 #define GYRO_1_CS_PIN PA4
44 #define GYRO_1_SPI_INSTANCE SPI1
46 #define USE_EXTI
47 #define USE_GYRO_EXTI
48 #define GYRO_1_EXTI_PIN PC4
49 #define USE_MPU_DATA_READY_SIGNAL
51 #define USE_GYRO
52 #define USE_GYRO_SPI_ICM20689
53 #define USE_GYRO_SPI_MPU6000
55 #define USE_ACC
56 #define USE_ACC_SPI_ICM20689
57 #define USE_ACC_SPI_MPU6000
59 #define USE_MAG
60 #define USE_MAG_HMC5883
61 #define USE_MAG_QMC5883
62 #define USE_MAG_LIS3MDL
64 // *************** Baro **************************
65 #define USE_I2C
67 #define USE_I2C_DEVICE_1
68 #define I2C1_SCL PB8
69 #define I2C1_SDA PB9
70 #define BARO_I2C_INSTANCE (I2CDEV_1)
72 #define USE_I2C_DEVICE_2
73 #define I2C_DEVICE (I2CDEV_2)
74 #define I2C2_SCL PB10
75 #define I2C2_SDA PB11
77 #define USE_BARO
78 #define USE_BARO_BMP280
79 #define DEFAULT_BARO_BMP280
81 // *************** Flash **************************
82 #define USE_SPI_DEVICE_3
83 #define SPI3_SCK_PIN PB3
84 #define SPI3_MISO_PIN PB4
85 #define SPI3_MOSI_PIN PB5
87 #define USE_FLASHFS
88 #define USE_FLASH_M25P16
89 #define FLASH_CS_PIN PC0
90 #define FLASH_SPI_INSTANCE SPI3
91 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
93 // *************** OSD *****************************
94 #define USE_SPI_DEVICE_2
95 #define SPI2_SCK_PIN PB13
96 #define SPI2_MISO_PIN PB14
97 #define SPI2_MOSI_PIN PB15
99 #define USE_MAX7456
100 #define MAX7456_SPI_INSTANCE SPI2
101 #define MAX7456_SPI_CS_PIN PB12
103 // *************** UART *****************************
104 #define USE_VCP
105 #define USB_DETECT_PIN PC15
106 #define USE_USB_DETECT
108 #define USE_UART1
109 #define UART1_RX_PIN PA10
110 #define UART1_TX_PIN PA9
112 #define USE_UART2
113 #define UART2_RX_PIN PA3
114 #define UART2_TX_PIN PA2
116 #define USE_UART3
117 #define UART3_RX_PIN PC11
118 #define UART3_TX_PIN PC10
120 #define USE_UART4
121 #define UART4_RX_PIN PA1
122 #define UART4_TX_PIN PA0
124 #define USE_UART5
125 #define UART5_RX_PIN PD2
126 #define UART5_TX_PIN PC12
128 #define USE_SOFTSERIAL1
129 #define USE_SOFTSERIAL2
131 #define SOFTSERIAL1_TX_PIN PB0
133 #define SERIAL_PORT_COUNT 8
135 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
136 #define SERIALRX_PROVIDER SERIALRX_SBUS
137 #define SERIALRX_UART SERIAL_PORT_USART2
139 // *************** ADC *****************************
140 #define USE_ADC
141 #define ADC_INSTANCE ADC1
142 #define ADC1_DMA_OPT 0
144 #define CURRENT_METER_ADC_PIN PC1
145 #define VBAT_ADC_PIN PC2
146 #define RSSI_ADC_PIN PC3
148 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_SOFTSERIAL)
149 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
150 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
151 #define CURRENT_METER_SCALE_DEFAULT 102
153 #define USE_ESCSERIAL
154 #define ESCSERIAL_TIMER_TX_PIN PA3
156 #define TARGET_IO_PORTA 0xffff
157 #define TARGET_IO_PORTB 0xffff
158 #define TARGET_IO_PORTC 0xffff
159 #define TARGET_IO_PORTD (BIT(2))
161 // *************** activate/deactivate Bluetooth When disarmed/armed using PINIO_BOX *****************************
162 #define PINIO1_PIN PA15
164 #define USABLE_TIMER_CHANNEL_COUNT 10
165 #define USED_TIMERS (TIM_N(1)|TIM_N(3)|TIM_N(4)|TIM_N(5)|TIM_N(8))