Add extra delays when cold-booting the UAV (#517)
[betaflight.git] / src / main / target / RMDO / target.h
blobaebcb0ce6685e77cbeaf3a5ba8b8e5d2e0266141
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 "RMDO" // Ready Made RC DoDo
22 #define LED0 PB3
24 #define BEEPER PC15
25 #define BEEPER_INVERTED
27 #define USE_EXTI
28 #define USE_MPU_DATA_READY_SIGNAL
29 #define ENSURE_MPU_DATA_READY_IS_LOW
30 //#define USE_MAG_DATA_READY_SIGNAL
31 //#define ENSURE_MAG_DATA_READY_IS_HIGH
33 #define GYRO
34 #define USE_GYRO_MPU6050
35 #define GYRO_MPU6050_ALIGN CW270_DEG
37 #define ACC
38 #define USE_ACC_MPU6050
39 #define ACC_MPU6050_ALIGN CW270_DEG
41 #define BARO
42 #define USE_BARO_BMP280
44 #define MAG
45 #define USE_MAG_AK8975
46 #define USE_MAG_HMC5883
47 #define USE_MAG_MAG3110
49 #define USE_FLASHFS
50 #define USE_FLASH_M25P16
52 #define SONAR
53 #define SONAR_TRIGGER_PIN PB0 // RC_CH7 (PB0) - only 3.3v ( add a 1K Ohms resistor )
54 #define SONAR_ECHO_PIN PB1 // RC_CH8 (PB1) - only 3.3v ( add a 1K Ohms resistor )
56 #define USE_UART1
57 #define USE_UART2
58 #define USE_UART3
59 #define USE_SOFTSERIAL1
60 #define USE_SOFTSERIAL2
61 #define SERIAL_PORT_COUNT 5
63 #define UART1_TX_PIN PA9
64 #define UART1_RX_PIN PA10
66 #define UART2_TX_PIN PA14 // PA14 / SWCLK
67 #define UART2_RX_PIN PA15 // PA15
69 #define UART3_TX_PIN PB10 // PB10 (AF7)
70 #define UART3_RX_PIN PB11 // PB11 (AF7)
72 #define SOFTSERIAL_1_TIMER TIM3
73 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 4 // PWM 5
74 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 5 // PWM 6
75 #define SOFTSERIAL_2_TIMER TIM3
76 #define SOFTSERIAL_2_TIMER_RX_HARDWARE 6 // PWM 7
77 #define SOFTSERIAL_2_TIMER_TX_HARDWARE 7 // PWM 8
79 #define USE_I2C
80 #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
82 #define USE_SPI
83 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
85 #define M25P16_CS_GPIO GPIOB
86 #define M25P16_CS_PIN PB12
87 #define M25P16_SPI_INSTANCE SPI2
89 #define BOARD_HAS_VOLTAGE_DIVIDER
90 #define USE_ADC
91 #define ADC_INSTANCE ADC2
92 #define VBAT_ADC_PIN PA4
93 #define CURRENT_METER_ADC_PIN PA5
94 #define RSSI_ADC_PIN PB2
96 #define LED_STRIP
98 #define USE_LED_STRIP_ON_DMA1_CHANNEL2
99 #define WS2811_PIN PA8
100 #define WS2811_TIMER TIM1
101 #define WS2811_DMA_CHANNEL DMA1_Channel2
102 #define WS2811_IRQ DMA1_Channel2_IRQn
103 #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC2
104 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER
107 #define NAV
108 //#define NAV_AUTO_MAG_DECLINATION
109 #define NAV_GPS_GLITCH_DETECTION
110 #define NAV_MAX_WAYPOINTS 30
112 #define SPEKTRUM_BIND
113 // USART3,
114 #define BIND_PIN PB11
116 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
118 #undef GPS_PROTO_NAZA
119 #undef TELEMETRY_HOTT
120 #undef TELEMETRY_SMARTPORT
122 // Number of available PWM outputs
123 #define MAX_PWM_OUTPUT_PORTS 12
125 // IO - stm32f303cc in 48pin package
126 #define TARGET_IO_PORTA 0xffff
127 #define TARGET_IO_PORTB 0xffff
128 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
129 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
131 #define USABLE_TIMER_CHANNEL_COUNT 17
132 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15) | TIM_N(16) |TIM_N(17))