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
28 #define USE_IMU_MPU6000
29 #define IMU_MPU6000_ALIGN CW270_DEG
32 #define GYRO_INT_EXTI PC4
33 #define USE_MPU_DATA_READY_SIGNAL
36 #define USE_BARO_BMP280
37 #define BMP280_SPI_BUS BUS_SPI3
38 #define BMP280_CS_PIN PB3
41 #define MAX7456_SPI_BUS BUS_SPI3
42 #define MAX7456_CS_PIN PA15
44 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
47 #define USE_SDCARD_SPI
48 #define SDCARD_DETECT_INVERTED
49 #define SDCARD_DETECT_PIN PB7
50 #define SDCARD_SPI_BUS BUS_SPI2
51 #define SDCARD_CS_PIN SPI2_NSS_PIN
54 #define VBUS_SENSING_PIN PC5
56 #define USE_UART_INVERTER
59 #define UART1_RX_PIN PA10
60 #define UART1_TX_PIN PA9
63 #define UART3_RX_PIN PB11
64 #define UART3_TX_PIN PB10
67 #define UART6_RX_PIN PC7
68 #define UART6_TX_PIN PC6
69 #define INVERTER_PIN_UART6_RX PC8
71 #define SERIAL_PORT_COUNT 4 // VCP, UART1, UART3, UART6
74 #define USE_SPI_DEVICE_1
76 #define USE_SPI_DEVICE_2
77 #define SPI2_NSS_PIN PB12
78 #define SPI2_SCK_PIN PB13
79 #define SPI2_MISO_PIN PB14
80 #define SPI2_MOSI_PIN PB15
82 #define USE_SPI_DEVICE_3
83 #define SPI3_NSS_PIN PA15
84 #define SPI3_SCK_PIN PC10
85 #define SPI3_MISO_PIN PC11
86 #define SPI3_MOSI_PIN PC12
89 #define ADC_CHANNEL_1_PIN PC1
90 #define ADC_CHANNEL_2_PIN PC2
91 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
92 #define VBAT_ADC_CHANNEL ADC_CHN_2
94 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
95 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_TELEMETRY)
96 #define SERIALRX_PROVIDER SERIALRX_SBUS
97 #define TELEMETRY_UART SERIAL_PORT_USART6
98 #define SERIALRX_UART SERIAL_PORT_USART1
100 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
102 #define TARGET_IO_PORTA (0xffff & ~(BIT(14)|BIT(13)))
103 #define TARGET_IO_PORTB (0xffff & ~(BIT(2)))
104 #define TARGET_IO_PORTC (0xffff & ~(BIT(15)|BIT(14)|BIT(13)))
105 #define TARGET_IO_PORTD BIT(2)
107 #define MAX_PWM_OUTPUT_PORTS 6