Merge pull request #10558 from iNavFlight/MrD_Correct-comments-on-OSD-symbols
[inav.git] / src / main / target / F4BY / target.h
blob21f91c1d49b91972a6e5ccc1d13bb1daa004c24f
1 /*
2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
18 #pragma once
19 #define TARGET_BOARD_IDENTIFIER "F4BY"
21 #define USBD_PRODUCT_STRING "Swift-Flyer F4BY"
23 #define LED0 PE3 // Blue LED
24 #define LED1 PE2 // Red LED
25 #define LED2 PE1 // Green LED
27 #define BEEPER PE5
28 #define BEEPER_INVERTED
30 #define MPU6000_CS_PIN PA4
31 #define MPU6000_SPI_BUS BUS_SPI1
32 #define ICM20689_CS_PIN PA4
33 #define ICM20689_SPI_BUS BUS_SPI1
36 #define USE_IMU_MPU6000
37 #define IMU_MPU6000_ALIGN CW90_DEG
39 #define USE_IMU_ICM20689
40 #define IMU_ICM20689_ALIGN CW90_DEG
42 #define USE_MAG
43 #define MAG_I2C_BUS BUS_I2C2
44 #define USE_MAG_ALL
46 #define TEMPERATURE_I2C_BUS BUS_I2C2
48 #define USE_BARO
49 #define BARO_I2C_BUS BUS_I2C2
50 #define USE_BARO_MS5611
53 #define USE_SDCARD
54 #define USE_SDCARD_SPI
55 #define SDCARD_SPI_BUS BUS_SPI2
56 #define SDCARD_CS_PIN PE15
58 #define USE_VCP
59 #define VBUS_SENSING_PIN PA9
61 #define USE_UART_INVERTER
63 #define USE_UART1
64 #define UART1_RX_PIN PB7
65 #define UART1_TX_PIN PB6
66 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2
68 #define USE_UART2
69 #define UART2_RX_PIN PD6
70 #define UART2_TX_PIN PD5
72 #define USE_UART3
73 #define UART3_RX_PIN PD9
74 #define UART3_TX_PIN PD8
76 #define USE_UART4
77 #define UART4_RX_PIN PC11
78 #define UART4_TX_PIN PC10
81 #define USE_UART6
82 #define UART6_RX_PIN PC7
83 #define UART6_TX_PIN PC6
84 #define INVERTER_PIN_UART6_RX PD3
86 #define SERIAL_PORT_COUNT 6 //VCP, UART1, UART2, UART3, UART4, UART6
88 #define USE_SPI
89 #define USE_SPI_DEVICE_1
90 #define SPI1_SCK_PIN PA5
91 #define SPI1_MISO_PIN PA6
92 #define SPI1_MOSI_PIN PA7
93 #define SPI1_NSS_PIN NONE
95 #define USE_SPI_DEVICE_2
96 #define SPI2_NSS_PIN NONE
97 #define SPI2_SCK_PIN PB13
98 #define SPI2_MISO_PIN PB14
99 #define SPI2_MOSI_PIN PB15
101 #define USE_SPI_DEVICE_3
102 #define SPI3_NSS_PIN PA15
103 #define SPI3_SCK_PIN PB3
104 #define SPI3_MISO_PIN PB4
105 #define SPI3_MOSI_PIN PB5
108 #define USE_I2C
109 #define USE_I2C_DEVICE_2
110 #define I2C2_SCL PB10
111 #define I2C2_SDA PB11
113 #define BOARD_HAS_VOLTAGE_DIVIDER
114 #define USE_ADC
115 #define ADC_CHANNEL_1_PIN PC3
116 #define ADC_CHANNEL_2_PIN PC2
117 #define ADC_CHANNEL_3_PIN PC1
118 #define VBAT_ADC_CHANNEL ADC_CHN_1
119 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
120 #define RSSI_ADC_CHANNEL ADC_CHN_3
122 #define SENSORS_SET (SENSOR_ACC|SENSOR_MAG|SENSOR_BARO)
124 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_VBAT | FEATURE_BLACKBOX)
125 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
127 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
129 // Number of available PWM outputs
130 #define MAX_PWM_OUTPUT_PORTS 15
132 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
134 #define TARGET_IO_PORTA 0xffff
135 #define TARGET_IO_PORTB 0xffff
136 #define TARGET_IO_PORTC 0xffff
137 #define TARGET_IO_PORTD 0xffff
138 #define TARGET_IO_PORTE 0xffff