Disable certain features on some targets to fit in FLASH
[betaflight.git] / src / main / target / RMDO / target.h
blob5b4c72573af00aea7ffebe00c055c3ce076619ed
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_GPIO GPIOB
23 #define LED0_PIN Pin_3
24 #define LED0_PERIPHERAL RCC_AHBPeriph_GPIOB
26 #define BEEP_GPIO GPIOC
27 #define BEEP_PIN Pin_15
28 #define BEEP_PERIPHERAL RCC_AHBPeriph_GPIOC
29 #define BEEPER_INVERTED
31 #define USABLE_TIMER_CHANNEL_COUNT 17
33 #define EXTI_CALLBACK_HANDLER_COUNT 2 // MPU data ready and MAG data ready
35 #define USE_MPU_DATA_READY_SIGNAL
36 #define ENSURE_MPU_DATA_READY_IS_LOW
38 #define USE_MAG_DATA_READY_SIGNAL
39 #define ENSURE_MAG_DATA_READY_IS_HIGH
42 #define GYRO
43 #define USE_GYRO_MPU6050
44 #define GYRO_MPU6050_ALIGN CW270_DEG
46 #define ACC
47 #define USE_ACC_MPU6050
48 #define ACC_MPU6050_ALIGN CW270_DEG
50 #define BARO
51 #define USE_BARO_BMP280
53 #define MAG
54 #define USE_MAG_AK8975
55 #define USE_MAG_HMC5883
56 #define USE_MAG_MAG3110
58 #define USE_FLASHFS
59 #define USE_FLASH_M25P16
61 #define SONAR
62 #define BEEPER
63 #define LED0
65 #define USE_USART1
66 #define USE_USART2
67 #define USE_USART3
68 #define USE_SOFTSERIAL1
69 #define USE_SOFTSERIAL2
70 #define SERIAL_PORT_COUNT 5
72 #ifndef UART1_GPIO
73 #define UART1_TX_PIN GPIO_Pin_9 // PA9
74 #define UART1_RX_PIN GPIO_Pin_10 // PA10
75 #define UART1_GPIO GPIOA
76 #define UART1_GPIO_AF GPIO_AF_7
77 #define UART1_TX_PINSOURCE GPIO_PinSource9
78 #define UART1_RX_PINSOURCE GPIO_PinSource10
79 #endif
81 #define UART2_TX_PIN GPIO_Pin_14 // PA14 / SWCLK
82 #define UART2_RX_PIN GPIO_Pin_15 // PA15
83 #define UART2_GPIO GPIOA
84 #define UART2_GPIO_AF GPIO_AF_7
85 #define UART2_TX_PINSOURCE GPIO_PinSource14
86 #define UART2_RX_PINSOURCE GPIO_PinSource15
88 #ifndef UART3_GPIO
89 #define UART3_TX_PIN GPIO_Pin_10 // PB10 (AF7)
90 #define UART3_RX_PIN GPIO_Pin_11 // PB11 (AF7)
91 #define UART3_GPIO_AF GPIO_AF_7
92 #define UART3_GPIO GPIOB
93 #define UART3_TX_PINSOURCE GPIO_PinSource10
94 #define UART3_RX_PINSOURCE GPIO_PinSource11
95 #endif
97 #define SOFTSERIAL_1_TIMER TIM3
98 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 4 // PWM 5
99 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 5 // PWM 6
100 #define SOFTSERIAL_2_TIMER TIM3
101 #define SOFTSERIAL_2_TIMER_RX_HARDWARE 6 // PWM 7
102 #define SOFTSERIAL_2_TIMER_TX_HARDWARE 7 // PWM 8
104 #define USE_I2C
105 #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
107 #define USE_SPI
108 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
110 #define SPI2_GPIO GPIOB
111 #define SPI2_GPIO_PERIPHERAL RCC_AHBPeriph_GPIOB
112 #define SPI2_NSS_PIN Pin_12
113 #define SPI2_NSS_PIN_SOURCE GPIO_PinSource12
114 #define SPI2_SCK_PIN Pin_13
115 #define SPI2_SCK_PIN_SOURCE GPIO_PinSource13
116 #define SPI2_MISO_PIN Pin_14
117 #define SPI2_MISO_PIN_SOURCE GPIO_PinSource14
118 #define SPI2_MOSI_PIN Pin_15
119 #define SPI2_MOSI_PIN_SOURCE GPIO_PinSource15
121 #define M25P16_CS_GPIO GPIOB
122 #define M25P16_CS_PIN GPIO_Pin_12
123 #define M25P16_SPI_INSTANCE SPI2
125 #define USE_ADC
126 #define BOARD_HAS_VOLTAGE_DIVIDER
129 #define ADC_INSTANCE ADC2
130 #define ADC_DMA_CHANNEL DMA2_Channel1
131 #define ADC_AHB_PERIPHERAL RCC_AHBPeriph_DMA2
133 #define VBAT_ADC_GPIO GPIOA
134 #define VBAT_ADC_GPIO_PIN GPIO_Pin_4
135 #define VBAT_ADC_CHANNEL ADC_Channel_1
137 #define CURRENT_METER_ADC_GPIO GPIOA
138 #define CURRENT_METER_ADC_GPIO_PIN GPIO_Pin_5
139 #define CURRENT_METER_ADC_CHANNEL ADC_Channel_2
141 #define RSSI_ADC_GPIO GPIOB
142 #define RSSI_ADC_GPIO_PIN GPIO_Pin_2
143 #define RSSI_ADC_CHANNEL ADC_Channel_12
145 #define LED_STRIP
146 #define LED_STRIP_TIMER TIM1
148 #define USE_LED_STRIP_ON_DMA1_CHANNEL2
149 #define WS2811_GPIO GPIOA
150 #define WS2811_GPIO_AHB_PERIPHERAL RCC_AHBPeriph_GPIOA
151 #define WS2811_GPIO_AF GPIO_AF_6
152 #define WS2811_PIN GPIO_Pin_8
153 #define WS2811_PIN_SOURCE GPIO_PinSource8
154 #define WS2811_TIMER TIM1
155 #define WS2811_TIMER_APB2_PERIPHERAL RCC_APB2Periph_TIM1
156 #define WS2811_DMA_CHANNEL DMA1_Channel2
157 #define WS2811_IRQ DMA1_Channel2_IRQn
159 #define GPS
160 #define GPS_PROTO_NMEA
161 #define GPS_PROTO_UBLOX
162 #define GPS_PROTO_I2C_NAV
163 //#define GPS_PROTO_NAZA
165 #define NAV
167 #define BLACKBOX
168 #define TELEMETRY
169 #define TELEMETRY_FRSKY
170 //#define TELEMETRY_HOTT
171 //#define TELEMETRY_SMARTPORT
172 #define TELEMETRY_LTM
174 #define SERIAL_RX
176 #define DISPLAY
177 //#define DISPLAY_ARMED_BITMAP
179 #define USE_SERVOS
180 #define USE_CLI
182 #define SPEKTRUM_BIND
183 // USART3,
184 #define BIND_PORT GPIOB
185 #define BIND_PIN Pin_11
187 #define USE_SERIAL_4WAY_BLHELI_INTERFACE