Fixed conditionals for 4 way ESC boot loader.
[betaflight.git] / src / main / target / RCEXPLORERF3 / target.h
blob0300699a70abc0ebf3f31b2f705d46bb17e5a990
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 "REF3"
25 // Removed to make the firmware fit into flash (in descending order of priority):
26 #undef USE_GYRO_OVERFLOW_CHECK
27 #undef USE_GYRO_LPF2
29 //#undef USE_TELEMETRY_MAVLINK
30 //#undef USE_TELEMETRY_LTM
31 #undef USE_SERIALRX_XBUS
33 #undef USE_EXTENDED_CMS_MENUS
34 #undef USE_RTC_TIME
35 #undef USE_RX_MSP
36 #undef USE_ESC_SENSOR_INFO
40 #define LED0_PIN PB4
41 #define LED1_PIN PB5
43 #define USE_BEEPER
44 #define BEEPER_PIN PA0
45 #define BEEPER_INVERTED
47 #define USE_EXTI
48 #define USE_MPU_DATA_READY_SIGNAL
49 #define USE_GYRO_EXTI
50 #define GYRO_1_EXTI_PIN PA15
52 #define USE_GYRO
53 #define USE_GYRO_SPI_MPU6000
54 #define USE_ACC_SPI_MPU6000
56 #define GYRO_1_CS_PIN PB12
57 #define GYRO_1_SPI_INSTANCE SPI2
59 #define USE_ACC
61 #define ACC_1_ALIGN CW180_DEG
62 #define GYRO_1_ALIGN CW180_DEG
64 #define USE_BARO
65 #define USE_BARO_MS5611
67 #define USE_MAG
68 #define USE_MAG_AK8975
69 #define USE_MAG_HMC5883 // External
71 #define MAG_AK8975_ALIGN CW180_DEG
73 #define USE_RANGEFINDER
74 #define USE_RANGEFINDER_HCSR04
75 #define RANGEFINDER_HCSR04_TRIGGER_PIN PA6 // RC_CH7 (PB0) - only 3.3v ( add a 1K Ohms resistor )
76 #define RANGEFINDER_HCSR04_ECHO_PIN PB1 // RC_CH8 (PB1) - only 3.3v ( add a 1K Ohms resistor )
78 #define USE_VCP
79 #define USE_UART1
80 #define USE_UART2
81 #define USE_UART3
82 #define USE_SOFTSERIAL1
83 #define USE_SOFTSERIAL2
85 #define SERIAL_PORT_COUNT 6
87 #define USE_ESCSERIAL
88 #define ESCSERIAL_TIMER_TX_PIN PA8 // (HARDARE=0)
90 #define UART1_TX_PIN PB6
91 #define UART1_RX_PIN PB7
93 #define UART2_TX_PIN PA2
94 #define UART2_RX_PIN PA3
96 #define UART3_TX_PIN PB10 // PB10 (AF7)
97 #define UART3_RX_PIN PB11 // PB11 (AF7)
99 #define USE_I2C
100 #define USE_I2C_DEVICE_2
101 #define I2C_DEVICE (I2CDEV_2)
103 #define I2C2_SCL PA9
104 #define I2C2_SDA PA10
106 #define USE_SPI
107 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
109 #define SPI2_NSS_PIN PB12
110 #define SPI2_SCK_PIN PB13
111 #define SPI2_MISO_PIN PB14
112 #define SPI2_MOSI_PIN PB15
114 #define USE_ADC
115 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
117 #define ADC_INSTANCE ADC2
118 #define VBAT_ADC_PIN PA5
119 #define CURRENT_METER_ADC_PIN PB2
120 #define RSSI_ADC_PIN PA6
122 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
123 #define SERIALRX_PROVIDER SERIALRX_SBUS
124 #define SERIALRX_UART SERIAL_PORT_USART1
126 #define USE_GPS_UBLOX
127 #define USE_GPS_NMEA
129 #define TARGET_IO_PORTA 0xffff
130 #define TARGET_IO_PORTB 0xffff
131 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
132 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
134 #define USABLE_TIMER_CHANNEL_COUNT 7
135 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(16) | TIM_N(17))