Merge pull request #11198 from SteveCEvans/sce_rc2
[betaflight.git] / src / main / target / MULTIFLITEPICO / target.h
blob18823a5a6bb0724c0df698bc8f5b9a01eeb43957
1 /*
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)
8 * any later version.
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/>.
21 #pragma once
23 #define TARGET_BOARD_IDENTIFIER "MFPB"
24 #define USE_TARGET_CONFIG
27 #define LED0_PIN PB3
29 #define USE_BEEPER
30 #define BEEPER_PIN PC15
31 #define BEEPER_INVERTED
33 #define USE_EXTI
34 #define USE_GYRO_EXTI
35 #define GYRO_1_EXTI_PIN PC13
36 #define USE_MPU_DATA_READY_SIGNAL
37 #define ENSURE_MPU_DATA_READY_IS_LOW
39 #define USE_GYRO
40 #define USE_GYRO_MPU6050
41 #define GYRO_1_ALIGN CW90_DEG
43 #define USE_ACC
44 #define USE_ACC_MPU6050
46 #define USE_BARO
47 #define USE_BARO_MS5611
48 #define USE_BARO_BMP085
49 #define USE_BARO_BMP280
51 #define USE_MAG
52 #define USE_MAG_AK8975
53 #define USE_MAG_HMC5883
54 #define USE_MAG_QMC5883
55 #define MAG_HMC5883_ALIGN CW270_DEG
57 #define USE_MAG_DATA_READY_SIGNAL
58 #define ENSURE_MAG_DATA_READY_IS_HIGH
59 #define MAG_INT_EXTI PC14
61 //#define USE_FLASHFS
62 //#define USE_FLASH_M25P16
64 #define USE_RANGEFINDER
65 #define USE_RANGEFINDER_HCSR04
66 #define RANGEFINDER_HCSR04_TRIGGER_PIN PB0
67 #define RANGEFINDER_HCSR04_ECHO_PIN PB1
69 #define USE_UART1
70 #define USE_UART2
71 #define USE_UART3
72 #define USE_SOFTSERIAL1
73 #define USE_SOFTSERIAL2
75 #define SERIAL_PORT_COUNT 5
77 #define USE_ESCSERIAL
78 #define ESCSERIAL_TIMER_TX_PIN PA0 // (HARDARE=0,PPM)
80 #define UART1_TX_PIN PA9
81 #define UART1_RX_PIN PA10
83 #define UART2_TX_PIN PA14 // PA14 / SWCLK
84 #define UART2_RX_PIN PA15
86 #define UART3_TX_PIN PB10 // PB10 (AF7)
87 #define UART3_RX_PIN PB11 // PB11 (AF7)
90 #define SOFTSERIAL1_RX_PIN PB4 // PWM 5
91 #define SOFTSERIAL1_TX_PIN PB5 // PWM 6
93 #define SOFTSERIAL2_RX_PIN PB0 // PWM 7
94 #define SOFTSERIAL2_TX_PIN PB1 // PWM 8
97 #define USE_I2C
98 #define USE_I2C_DEVICE_1
99 #define I2C_DEVICE (I2CDEV_1)
101 #define USE_SPI
102 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
104 //#define FLASH_CS_PIN PB12
105 //#define FLASH_SPI_INSTANCE SPI2
107 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
108 #define USE_ADC
109 #define ADC_INSTANCE ADC2
110 #define VBAT_ADC_PIN PA4
111 #define CURRENT_METER_ADC_PIN PA5
112 #define RSSI_ADC_PIN PB2
114 #define REMAP_TIM17_DMA
116 // UART1 TX uses DMA1_Channel4, which is also used by dshot on motor 4
117 #if defined(USE_UART1_TX_DMA) && defined(USE_DSHOT)
118 #undef USE_UART1_TX_DMA
119 #endif
121 //#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
123 #define DEFAULT_FEATURES (FEATURE_MOTOR_STOP)
124 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
125 #define BRUSHED_MOTORS
126 #define SERIALRX_PROVIDER SERIALRX_SPEKTRUM2048
127 #define SERIALRX_UART SERIAL_PORT_USART3
128 #define RX_CHANNELS_TAER
130 #define BINDPLUG_PIN PA13
132 // IO - stm32f303cc in 48pin package
133 #define TARGET_IO_PORTA 0xffff
134 #define TARGET_IO_PORTB 0xffff
135 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
136 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(3)|BIT(4))
138 #define USABLE_TIMER_CHANNEL_COUNT 17
139 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15) | TIM_N(16) | TIM_N(17) )