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)
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/>.
25 #define TARGET_BOARD_IDENTIFIER "PIRX"
26 #define USBD_PRODUCT_STRING "Pirx F4"
30 #define TARGET_BOARD_IDENTIFIER "RRF4"
31 #define USBD_PRODUCT_STRING "Worm FC"
35 #define USE_TARGET_CONFIGURATION
46 #define ENABLE_DSHOT_DMAR DSHOT_DMAR_ON
48 //define camera control
50 // XXX CAMERA_CONTROL_PIN is deprecated.
51 // XXX Target maintainer must create a valid timerHardware[] array entry for PA4 with TIM_USE_CAMERA_CONTROL
52 //#define CAMERA_CONTROL_PIN PA4
58 #define BEEPER_PIN PA15
60 #define BEEPER_PIN PB14
62 #define BEEPER_INVERTED
67 #define GYRO_1_EXTI_PIN PC5
69 #define GYRO_1_EXTI_PIN PC4
71 #define USE_MPU_DATA_READY_SIGNAL
74 #define GYRO_1_CS_PIN PC4
76 #define GYRO_1_CS_PIN PA4
78 #define GYRO_1_SPI_INSTANCE SPI1
80 // ACC section -- start
82 #define USE_ACC_SPI_MPU6500
85 // GYRO section -- start
87 #define USE_GYRO_SPI_MPU6500
89 #define GYRO_1_ALIGN CW0_DEG
91 #define GYRO_1_ALIGN CW180_DEG_FLIP
93 // GYRO section -- end
98 #define USE_BARO_SPI_LPS
99 #define BARO_SPI_INSTANCE SPI3
100 #define BARO_CS_PIN PB8
105 #define INVERTER_PIN_UART6 PA8
106 #define INVERTER_PIN_UART3 PB1
108 #define INVERTER_PIN_UART6 PB13
109 #define INVERTER_PIN_UART3 PB12
113 #define USB_DETECT_PIN PA9
114 #define USE_USB_DETECT
117 #define UART1_RX_PIN PB7
118 #define UART1_TX_PIN PB6
122 #define UART2_RX_PIN PA3
123 #define UART2_TX_PIN PA2
127 #define UART3_RX_PIN PB11
128 #define UART3_TX_PIN PB10
131 #define UART4_RX_PIN PA1
132 #define UART4_TX_PIN PA0
135 #define UART6_RX_PIN PC7
136 #define UART6_TX_PIN PC6
139 #define SERIAL_PORT_COUNT 6 //VCP, USART1, USART2, USART3, USART4, USART6
141 #define SERIAL_PORT_COUNT 5 //VCP, USART1, USART3, USART4, USART6
144 #define USE_ESCSERIAL
145 #define ESCSERIAL_TIMER_TX_PIN PB9
150 #define USE_SPI_DEVICE_1
153 #define USE_SPI_DEVICE_2
155 #define USE_SPI_DEVICE_3
156 #define SPI3_SCK_PIN PB3
157 #define SPI3_MISO_PIN PB4
158 #define SPI3_MOSI_PIN PB5
164 #define MAX7456_SPI_INSTANCE SPI2
165 #define MAX7456_SPI_CS_PIN PB12
167 #define MAX7456_SPI_INSTANCE SPI3
168 #define MAX7456_SPI_CS_PIN PC0
172 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
173 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
175 #define VBAT_ADC_PIN PC2
176 #define RSSI_ADC_PIN PC1
177 #define CURRENT_METER_ADC_PIN PC3
179 #define VBAT_ADC_PIN PC1
180 #define CURRENT_METER_ADC_PIN PC2
183 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
184 #define SERIALRX_PROVIDER SERIALRX_SBUS
186 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
190 #define USE_SDCARD_SDIO
192 #define SDCARD_SDIO_DMA_OPT 0 // DMA 2 Stream 3 Channel 4
193 #define SDCARD_SPI_CS_PIN NONE //This is not used on SDIO, has to be kept for now to keep compiler happy
195 #define SDCARD_DETECT_PIN PC15
197 #define SDCARD_DETECT_PIN PB15
200 #define TARGET_IO_PORTA 0xffff
201 #define TARGET_IO_PORTB 0xffff
202 #define TARGET_IO_PORTC 0xffff
203 #define TARGET_IO_PORTD (BIT(2))
205 #define USABLE_TIMER_CHANNEL_COUNT 7
206 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) )