Create release.yml
[betaflight.git] / src / main / target / FF_RACEPIT / target.h
blob5336b8147bc468974ffb674be9993f7cca9a8176
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
22 #define TARGET_BOARD_IDENTIFIER "RACE"
23 #define USBD_PRODUCT_STRING "RacePit"
24 #define USE_TARGET_CONFIG
26 #define USE_HARDWARE_REVISION_DETECTION
28 /*--------------LED----------------*/
29 #define LED0_PIN PB9
30 #define LED1_PIN PB8
31 /*---------------------------------*/
33 /*------------BEEPER---------------*/
34 #define USE_BEEPER
35 #define BEEPER_PIN PC3
36 #define BEEPER_INVERTED
37 /*---------------------------------*/
39 /*---------- VTX POWER SWITCH---------*/
40 #define USE_PINIO
41 #define PINIO1_PIN PC0 // VTX power switcher
42 #define PINIO2_PIN PC8 // 2xCamera switcher
43 #define USE_PINIOBOX
45 /*------------SENSORS--------------*/
46 // MPU interrupt
47 #define USE_EXTI
48 #define GYRO_1_INT_EXTI_PIN PC4
50 #define USE_MPU_DATA_READY_SIGNAL
51 #define ENSURE_MPU_DATA_READY_IS_LOW
53 #define USE_GYRO
54 #define USE_ACC
56 #define USE_GYRO_SPI_MPU6000
57 #define USE_ACC_SPI_MPU6000
59 #define GYRO_1_CS_PIN SPI1_NSS_PIN
60 #define GYRO_1_SPI_INSTANCE SPI1
61 /*---------------------------------*/
64 /*-------------OSD-----------------*/
65 #define USE_MAX7456
66 #define MAX7456_SPI_INSTANCE SPI2
67 #define MAX7456_SPI_CS_PIN SPI2_NSS_PIN
68 /*---------------------------------*/
70 /*------------FLASH----------------*/
71 #define FLASH_CS_PIN PA15
72 #define FLASH_SPI_INSTANCE SPI3
74 #define USE_FLASHFS
75 #define USE_FLASH_M25P16
76 /*---------------------------------*/
78 /*-----------USB-UARTs-------------*/
79 #define USE_VCP
81 #define USE_UART1
82 #define UART1_RX_PIN PB7
83 #define UART1_TX_PIN PA9
85 #define USE_UART2
86 #define UART2_RX_PIN PA3
87 #define UART2_TX_PIN PA2
89 #define USE_UART3
90 #define UART3_RX_PIN PC11
91 #define UART3_TX_PIN PC10
92 #define INVERTER_PIN_UART3 PC15
94 #define USE_UART4
95 #define UART4_TX_PIN PA0
96 #define UART4_RX_PIN PA1
98 #define USE_UART5
99 #define UART5_RX_PIN PD2
100 #define UART5_TX_PIN PC12
102 #define USE_UART6
103 #define UART6_RX_PIN PC7
104 #define UART6_TX_PIN PC6
106 #define SERIAL_PORT_COUNT 7
107 /*---------------------------------*/
109 /*-------------SPIs----------------*/
110 #define USE_SPI
112 #define USE_SPI_DEVICE_1
113 #define SPI1_NSS_PIN PA4
114 #define SPI1_SCK_PIN PA5
115 #define SPI1_MISO_PIN PA6
116 #define SPI1_MOSI_PIN PA7
118 #define USE_SPI_DEVICE_2
119 #define SPI2_NSS_PIN PB12
120 #define SPI2_SCK_PIN PB13
121 #define SPI2_MISO_PIN PB14
122 #define SPI2_MOSI_PIN PB15
124 #define USE_SPI_DEVICE_3
125 #define SPI3_NSS_PIN PA15
126 #define SPI3_SCK_PIN PB3
127 #define SPI3_MISO_PIN PB4
128 #define SPI3_MOSI_PIN PB5
129 /*---------------------------------*/
131 /*-------------I2C-----------------*/
132 #define USE_I2C
133 #define USE_I2C_PULLUP
134 #define USE_I2C_DEVICE_3
135 #define I2C_DEVICE (I2CDEV_3)
136 #define I2C3_SCL PA8
137 #define I2C3_SDA PC9
138 /*---------------------------------*/
140 /*-------------ADCs----------------*/
141 #define USE_ADC
142 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
143 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
144 #define VBAT_ADC_PIN PC2
145 #define CURRENT_METER_ADC_PIN PC1
146 /*---------------------------------*/
148 /*-------------ESCs----------------*/
149 #define USE_ESCSERIAL
150 #define ESCSERIAL_TIMER_TX_PIN PB0 // (HARDWARE=0)
151 /*---------------------------------*/
153 /*--------DEFAULT VALUES-----------*/
154 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
155 #define SERIALRX_PROVIDER SERIALRX_SBUS
156 #define SERIALRX_UART SERIAL_PORT_USART3
157 #define DEFAULT_FEATURES FEATURE_OSD
159 #define TARGET_IO_PORTA 0xffff
160 #define TARGET_IO_PORTB 0xffff
161 #define TARGET_IO_PORTC 0xffff
162 #define TARGET_IO_PORTD (BIT(2))
163 /*---------------------------------*/
165 /*--------------TIMERS-------------*/
166 #define USABLE_TIMER_CHANNEL_COUNT 6
167 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) )
168 /*---------------------------------*/