2 * This is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation, either version 3 of the License, or
5 * (at your option) any later version.
7 * This software is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this software. If not, see <http://www.gnu.org/licenses/>.
18 #define TARGET_BOARD_IDENTIFIER "FRF4"
19 #define USBD_PRODUCT_STRING "FRSKYF4"
23 #define BEEPER_INVERTED
25 #define MPU6000_CS_PIN PA4
26 #define MPU6000_SPI_BUS BUS_SPI1
27 #define USE_IMU_MPU6000
28 #define IMU_MPU6000_ALIGN CW270_DEG
31 #define USE_BARO_BMP280
32 #define BMP280_SPI_BUS BUS_SPI3
33 #define BMP280_CS_PIN PB3
36 #define MAX7456_SPI_BUS BUS_SPI3
37 #define MAX7456_CS_PIN PA15
39 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
42 #define USE_SDCARD_SPI
43 #define SDCARD_DETECT_INVERTED
44 #define SDCARD_DETECT_PIN PB7
45 #define SDCARD_SPI_BUS BUS_SPI2
46 #define SDCARD_CS_PIN SPI2_NSS_PIN
49 #define VBUS_SENSING_PIN PC5
51 #define USE_UART_INVERTER
54 #define UART1_RX_PIN PA10
55 #define UART1_TX_PIN PA9
58 #define UART3_RX_PIN PB11
59 #define UART3_TX_PIN PB10
62 #define UART6_RX_PIN PC7
63 #define UART6_TX_PIN PC6
64 #define INVERTER_PIN_UART6_RX PC8
66 #define SERIAL_PORT_COUNT 4 // VCP, UART1, UART3, UART6
69 #define USE_SPI_DEVICE_1
71 #define USE_SPI_DEVICE_2
72 #define SPI2_NSS_PIN PB12
73 #define SPI2_SCK_PIN PB13
74 #define SPI2_MISO_PIN PB14
75 #define SPI2_MOSI_PIN PB15
77 #define USE_SPI_DEVICE_3
78 #define SPI3_NSS_PIN PA15
79 #define SPI3_SCK_PIN PC10
80 #define SPI3_MISO_PIN PC11
81 #define SPI3_MOSI_PIN PC12
84 #define ADC_CHANNEL_1_PIN PC1
85 #define ADC_CHANNEL_2_PIN PC2
86 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
87 #define VBAT_ADC_CHANNEL ADC_CHN_2
89 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
90 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_TELEMETRY)
91 #define SERIALRX_PROVIDER SERIALRX_SBUS
92 #define TELEMETRY_UART SERIAL_PORT_USART6
93 #define SERIALRX_UART SERIAL_PORT_USART1
95 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
97 #define TARGET_IO_PORTA (0xffff & ~(BIT(14)|BIT(13)))
98 #define TARGET_IO_PORTB (0xffff & ~(BIT(2)))
99 #define TARGET_IO_PORTC (0xffff & ~(BIT(15)|BIT(14)|BIT(13)))
100 #define TARGET_IO_PORTD BIT(2)
102 #define MAX_PWM_OUTPUT_PORTS 6