Merge pull request #11198 from SteveCEvans/sce_rc2
[betaflight.git] / src / main / target / ELLE0 / target.h
blob63de01bfe328989ab207a5d1859ff81d87e36cfc
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
22 #define TARGET_BOARD_IDENTIFIER "ELL0"
24 #define TARGET_XTAL_MHZ 25
26 #define USBD_PRODUCT_STRING "Elle0"
28 #define LED0_PIN PA8
29 #define LED1_PIN PB4
30 #define LED2_PIN PC2
32 // MPU9250 interrupt
33 #define USE_EXTI
34 #define USE_GYRO_EXTI
35 #define GYRO_1_EXTI_PIN PB5
36 #define USE_MPU_DATA_READY_SIGNAL
37 #define ENSURE_MPU_DATA_READY_IS_LOW
39 #define GYRO_1_CS_PIN PB12
40 #define GYRO_1_SPI_INSTANCE SPI2
42 // Using MPU6050 for the moment.
43 #define USE_GYRO
44 #define USE_GYRO_SPI_MPU6500
45 #define GYRO_1_ALIGN CW270_DEG
47 #define USE_ACC
48 #define USE_ACC_SPI_MPU6500
50 //#define USE_BARO
51 //#define USE_BARO_MS5611
53 #define USE_MAG
54 #define USE_MAG_AK8963
55 #define MAG_AK8963_ALIGN CW0_DEG_FLIP
57 #define USE_VCP
59 /* Telemetry (Overlaps with DMA from motors) */
60 //#define USE_UART1
61 //#define UART1_RX_PIN PA10
62 //#define UART1_TX_PIN PA9
64 /* RX1 */
65 #define USE_UART2
66 #define UART2_RX_PIN PA3
67 #define UART2_TX_PIN PA2
69 /* I2C */
70 #define USE_UART3
71 #define UART3_RX_PIN PB11
72 #define UART3_TX_PIN PB10
74 /* RX2 */
75 //#define USE_UART5
76 //#define UART5_RX_PIN PD2
77 //#define UART5_TX_PIN PC12
79 #define USE_SOFTSERIAL1
80 #define USE_SOFTSERIAL2
82 #define SERIAL_PORT_COUNT 5
84 #define USE_SPI
86 #define USE_SPI_DEVICE_2 //MPU9250
87 #define SPI2_NSS_PIN PB12
88 #define SPI2_SCK_PIN PB13
89 #define SPI2_MISO_PIN PB14
90 #define SPI2_MOSI_PIN PB15
92 #define USE_ADC
93 #define VBAT_ADC_PIN PC4
94 #define CURRENT_METER_ADC_PIN PC5
96 #undef USE_LED_STRIP
98 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
99 #define SERIALRX_PROVIDER SERIALRX_SPEKTRUM2048
100 #define SERIALRX_UART SERIAL_PORT_USART2
101 #define RX_CHANNELS_TAER
103 #define TARGET_IO_PORTA 0xffff
104 #define TARGET_IO_PORTB 0xffff
105 #define TARGET_IO_PORTC 0xffff
106 #define TARGET_IO_PORTD (BIT(2))
108 #define USABLE_TIMER_CHANNEL_COUNT 9
109 #define USED_TIMERS (TIM_N(2) | TIM_N(4) | TIM_N(5) | TIM_N(8))