Merge pull request #11483 from SteveCEvans/elrs_race
[betaflight.git] / src / main / target / LUMBAF3 / target.h
blob8cbca990ddc000722b162965a8ee6fbb66040e35
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 "MCF3" // LumbaF3 Flight Controller by mC
25 #define LED0_PIN PB3
26 #define USE_BEEPER
27 #define BEEPER_PIN PC15
29 #define USE_EXTI
30 #define USE_GYRO_EXTI
31 #define GYRO_1_EXTI_PIN PA3
32 #define USE_MPU_DATA_READY_SIGNAL
34 #define USE_SPI
35 #define USE_SPI_DEVICE_1
36 #define USE_SPI_DEVICE_2
38 #define GYRO_1_CS_PIN PA4
39 #define GYRO_1_SPI_INSTANCE SPI1
41 #define FLASH_CS_PIN PB12
42 #define FLASH_SPI_INSTANCE SPI2
44 #define USE_FLASHFS
45 #define USE_FLASH_M25P16
47 #define USE_GYRO
48 #define USE_GYRO_SPI_MPU6000
49 #define GYRO_1_ALIGN CW90_DEG
51 #define USE_ACC
52 #define USE_ACC_SPI_MPU6000
54 #define USE_VCP
55 #define USE_UART1
56 #define USE_UART3
57 #define USE_SOFTSERIAL1
59 #define SERIAL_PORT_COUNT 4
61 #define UART1_TX_PIN PA9
62 #define UART1_RX_PIN PA10
63 #ifdef USE_UART1_RX_DMA
64 #undef USE_UART1_RX_DMA
65 #endif
67 #define UART3_TX_PIN PB10
68 #define UART3_RX_PIN PB11
70 #define SOFTSERIAL1_TX_PIN PB5
71 #define SOFTSERIAL1_RX_PIN PB0
73 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
74 #define USE_ADC
75 #define CURRENT_METER_ADC_PIN PB1
76 #define VBAT_ADC_PIN PA0
78 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
79 #define SERIALRX_PROVIDER SERIALRX_SBUS
80 #define SERIALRX_UART SERIAL_PORT_USART1
81 #define DEFAULT_FEATURES FEATURE_TELEMETRY
83 #define TARGET_IO_PORTA 0xffff
84 #define TARGET_IO_PORTB 0xffff
85 #define TARGET_IO_PORTC ( BIT(15) )
87 #define USABLE_TIMER_CHANNEL_COUNT 10
88 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(15) | TIM_N(16) )