[FLYWOOF411] add board documentation
[inav/snaewe.git] / src / main / target / FALCORE / target.h
blobd8480eda73c1b75e3aa901b0eb9984abab17c2d7
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
20 #define TARGET_BOARD_IDENTIFIER "FLCR" // FaLCoRre
22 #define LED0 PC2
23 #define LED1 PB11
25 #define USE_HARDWARE_PREBOOT_SETUP // FALCORE board requires some hardware to be set up before booting and detecting sensors
27 #define BEEPER PB4
28 #define BEEPER_PWM
29 #define BEEPER_PWM_FREQUENCY 2700
31 #define MPU6500_CS_PIN PC0
32 #define MPU6500_SPI_BUS BUS_SPI1
34 #define USE_EXTI
35 #define GYRO_INT_EXTI PB0
36 #define USE_MPU_DATA_READY_SIGNAL
38 #define USE_IMU_MPU6500
39 #define IMU_MPU6500_ALIGN CW0_DEG
41 #define USE_BARO
42 #define BARO_I2C_BUS BUS_I2C1
43 #define USE_BARO_MS5607
45 #define USE_MAG
46 #define MAG_I2C_BUS BUS_I2C2
47 #define USE_MAG_HMC5883
48 #define USE_MAG_QMC5883
49 #define USE_MAG_IST8310
50 #define USE_MAG_IST8308
51 #define USE_MAG_MAG3110
52 #define USE_MAG_LIS3MDL
54 #define USE_VCP
55 #define USE_UART1
56 #define USE_UART2
57 #define USE_UART4
58 #define USE_UART5
59 #define SERIAL_PORT_COUNT 5
60 #define AVOID_UART2_FOR_PWM_PPM
62 #define UART1_TX_PIN PC4
63 #define UART1_RX_PIN PC5
65 #define UART2_TX_PIN PA2 // PA2 - Clashes with PWM6 input.
66 #define UART2_RX_PIN PA3
68 #define UART4_TX_PIN PC10
69 #define UART4_RX_PIN PC11
71 #define UART5_TX_PIN PC12
72 #define UART5_RX_PIN PD2
74 #define USE_SPI
75 #define USE_SPI_DEVICE_1
76 #define USE_SPI_DEVICE_2
78 #define SPI1_SCK_PIN PA5
79 #define SPI1_MISO_PIN PA6
80 #define SPI1_MOSI_PIN PB5
82 #define SPI2_SCK_PIN PB13
83 #define SPI2_MISO_PIN PB14
84 #define SPI2_MOSI_PIN PB15
86 #define USE_I2C
88 #define USE_I2C_DEVICE_1
89 #define I2C1_SCL PB6
90 #define I2C1_SDA PB7
92 #define USE_I2C_DEVICE_2
93 #define I2C2_SCL PA9
94 #define I2C2_SDA PA10
96 #define VBAT_SCALE_DEFAULT 78
97 #define BOARD_HAS_VOLTAGE_DIVIDER
98 #define USE_ADC
99 #define ADC_INSTANCE ADC1
100 #define ADC_CHANNEL_1_PIN PF4
101 #define ADC_CHANNEL_2_PIN PA1
102 #define VBAT_ADC_CHANNEL ADC_CHN_1
103 #define RSSI_ADC_CHANNEL ADC_CHN_2
105 #define USE_LED_STRIP
106 #define WS2811_PIN PA8
108 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
110 #define USE_FLASHFS
111 #define USE_FLASH_M25P16
112 #define M25P16_CS_PIN PC1
113 #define M25P16_SPI_BUS BUS_SPI2
114 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
116 #define USE_SPEKTRUM_BIND
117 // USART2, PA3
118 #define BIND_PIN PA3
120 #define USE_RANGEFINDER
121 #define USE_RANGEFINDER_HCSR04
122 #define RANGEFINDER_HCSR04_TRIGGER_PIN PA7
123 #define RANGEFINDER_HCSR04_ECHO_PIN PA2
125 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX | FEATURE_VBAT | FEATURE_GPS | FEATURE_TELEMETRY | FEATURE_LED_STRIP)
126 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
128 // Number of available PWM outputs
129 #define MAX_PWM_OUTPUT_PORTS 6
131 // available IO pins (from schematics)
132 #define TARGET_IO_PORTA 0xFFFF
133 #define TARGET_IO_PORTB 0xFFFF
134 #define TARGET_IO_PORTC 0xFFFF
135 #define TARGET_IO_PORTD 0xFFFF
136 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
138 #define PCA9685_I2C_BUS BUS_I2C2