Go to the documentation of this file.
20 #define USE_QUAD_MIXER_ONLY 0
21 #define TARGET_BOARD_IDENTIFIER "SRFM"
27 #define LED0_GPIO GPIOB
28 #define LED0_PIN Pin_3
29 #define LED0_PERIPHERAL RCC_AHBPeriph_GPIOB
31 #define BEEP_GPIO GPIOC
32 #define BEEP_PIN Pin_15
33 #define BEEP_PERIPHERAL RCC_AHBPeriph_GPIOC
34 #define BEEPER_INVERTED
36 #define USABLE_TIMER_CHANNEL_COUNT 12 // 8 Outputs; PPM; LED Strip; 2 additional PWM pins also on UART3 RX/TX pins.
38 #define EXTI15_10_CALLBACK_HANDLER_COUNT 2 // MPU_INT, SDCardDetect
40 #define USE_MPU_DATA_READY_SIGNAL
41 #define ENSURE_MPU_DATA_READY_IS_LOW
43 #define USE_MAG_DATA_READY_SIGNAL
44 #define ENSURE_MAG_DATA_READY_IS_HIGH
49 #define USE_GYRO_MPU6500
53 #define USE_ACC_MPU6500
55 #define ACC_MPU6500_ALIGN CW180_DEG
56 #define GYRO_MPU6500_ALIGN CW180_DEG
59 #define USE_BARO_BMP280
62 #define USE_MPU9250_MAG // Enables bypass configuration
63 #define USE_MAG_AK8963
64 #define USE_MAG_HMC5883 // External
66 #define MAG_AK8963_ALIGN CW90_DEG_FLIP
72 #define SONAR_TRIGGER_PIN Pin_0 // RC_CH7 (PB0) - only 3.3v ( add a 1K Ohms resistor )
73 #define SONAR_TRIGGER_GPIO GPIOB
74 #define SONAR_ECHO_PIN Pin_1 // RC_CH8 (PB1) - only 3.3v ( add a 1K Ohms resistor )
75 #define SONAR_ECHO_GPIO GPIOB
76 #define SONAR_EXTI_LINE EXTI_Line1
77 #define SONAR_EXTI_PIN_SOURCE EXTI_PinSource1
78 #define SONAR_EXTI_IRQN EXTI1_IRQn
81 #define USB_CABLE_DETECTION
83 #define USB_DETECT_PIN GPIO_Pin_5
84 #define USB_DETECT_GPIO_PORT GPIOB
85 #define USB_DETECT_GPIO_CLK RCC_AHBPeriph_GPIOC
91 #define USE_SOFTSERIAL1
92 #define SERIAL_PORT_COUNT 5
95 #define UART1_TX_PIN GPIO_Pin_9 // PA9
96 #define UART1_RX_PIN GPIO_Pin_10 // PA10
97 #define UART1_GPIO GPIOA
98 #define UART1_GPIO_AF GPIO_AF_7
99 #define UART1_TX_PINSOURCE GPIO_PinSource9
100 #define UART1_RX_PINSOURCE GPIO_PinSource10
103 #define UART2_TX_PIN GPIO_Pin_14 // PA14 / SWCLK
104 #define UART2_RX_PIN GPIO_Pin_15 // PA15
105 #define UART2_GPIO GPIOA
106 #define UART2_GPIO_AF GPIO_AF_7
107 #define UART2_TX_PINSOURCE GPIO_PinSource14
108 #define UART2_RX_PINSOURCE GPIO_PinSource15
111 #define UART3_TX_PIN GPIO_Pin_10 // PB10 (AF7)
112 #define UART3_RX_PIN GPIO_Pin_11 // PB11 (AF7)
113 #define UART3_GPIO_AF GPIO_AF_7
114 #define UART3_GPIO GPIOB
115 #define UART3_TX_PINSOURCE GPIO_PinSource10
116 #define UART3_RX_PINSOURCE GPIO_PinSource11
119 #define SOFTSERIAL_1_TIMER TIM2
120 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 9 // PA0
121 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 10 // PA1
124 #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
127 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
129 #define SPI2_GPIO GPIOB
130 #define SPI2_GPIO_PERIPHERAL RCC_AHBPeriph_GPIOB
131 #define SPI2_NSS_PIN Pin_12
132 #define SPI2_NSS_PIN_SOURCE GPIO_PinSource12
133 #define SPI2_SCK_PIN Pin_13
134 #define SPI2_SCK_PIN_SOURCE GPIO_PinSource13
135 #define SPI2_MISO_PIN Pin_14
136 #define SPI2_MISO_PIN_SOURCE GPIO_PinSource14
137 #define SPI2_MOSI_PIN Pin_15
138 #define SPI2_MOSI_PIN_SOURCE GPIO_PinSource15
141 #define USE_SDCARD_SPI2
143 #define SDCARD_DETECT_INVERTED
145 #define SDCARD_DETECT_PIN GPIO_Pin_14
146 #define SDCARD_DETECT_EXTI_LINE EXTI_Line14
147 #define SDCARD_DETECT_EXTI_PIN_SOURCE EXTI_PinSource14
148 #define SDCARD_DETECT_GPIO_PORT GPIOC
149 #define SDCARD_DETECT_GPIO_CLK RCC_AHBPeriph_GPIOC
150 #define SDCARD_DETECT_EXTI_PORT_SOURCE EXTI_PortSourceGPIOC
151 #define SDCARD_DETECT_EXTI_IRQn EXTI15_10_IRQn
153 #define SDCARD_SPI_INSTANCE SPI2
154 #define SDCARD_SPI_CS_GPIO SPI2_GPIO
155 #define SDCARD_SPI_CS_PIN SPI2_NSS_PIN
158 #define SDCARD_SPI_INITIALIZATION_CLOCK_DIVIDER 128
160 #define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 2
163 #define SDCARD_DMA_CHANNEL_TX DMA1_Channel5
164 #define SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG DMA1_FLAG_TC5
170 #define BOARD_HAS_VOLTAGE_DIVIDER
173 #define ADC_INSTANCE ADC2
174 #define ADC_DMA_CHANNEL DMA2_Channel1
175 #define ADC_AHB_PERIPHERAL RCC_AHBPeriph_DMA2
177 #define VBAT_ADC_GPIO GPIOA
178 #define VBAT_ADC_GPIO_PIN GPIO_Pin_4
179 #define VBAT_ADC_CHANNEL ADC_Channel_1
181 #define CURRENT_METER_ADC_GPIO GPIOA
182 #define CURRENT_METER_ADC_GPIO_PIN GPIO_Pin_5
183 #define CURRENT_METER_ADC_CHANNEL ADC_Channel_2
185 #define RSSI_ADC_GPIO GPIOB
186 #define RSSI_ADC_GPIO_PIN GPIO_Pin_2
187 #define RSSI_ADC_CHANNEL ADC_Channel_12
190 #define LED_STRIP_TIMER TIM1
192 #define WS2811_GPIO GPIOA
193 #define WS2811_GPIO_AHB_PERIPHERAL RCC_AHBPeriph_GPIOA
194 #define WS2811_GPIO_AF GPIO_AF_6
195 #define WS2811_PIN GPIO_Pin_8
196 #define WS2811_PIN_SOURCE GPIO_PinSource8
197 #define WS2811_TIMER TIM1
198 #define WS2811_TIMER_APB2_PERIPHERAL RCC_APB2Periph_TIM1
199 #define WS2811_DMA_CHANNEL DMA1_Channel2
200 #define WS2811_IRQ DMA1_Channel2_IRQn
201 #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC2
202 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER
205 #define TRANSPONDER_GPIO GPIOA
206 #define TRANSPONDER_GPIO_AHB_PERIPHERAL RCC_AHBPeriph_GPIOA
207 #define TRANSPONDER_GPIO_AF GPIO_AF_6
208 #define TRANSPONDER_PIN GPIO_Pin_8
209 #define TRANSPONDER_PIN_SOURCE GPIO_PinSource8
210 #define TRANSPONDER_TIMER TIM1
211 #define TRANSPONDER_TIMER_APB2_PERIPHERAL RCC_APB2Periph_TIM1
212 #define TRANSPONDER_DMA_CHANNEL DMA1_Channel2
213 #define TRANSPONDER_IRQ DMA1_Channel2_IRQn
214 #define TRANSPONDER_DMA_TC_FLAG DMA1_FLAG_TC2
215 #define TRANSPONDER_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER
217 #define REDUCE_TRANSPONDER_CURRENT_DRAW_WHEN_USB_CABLE_PRESENT
219 #define DEFAULT_RX_FEATURE FEATURE_RX_PPM
223 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
232 #define BUTTON_A_PORT GPIOB
233 #define BUTTON_A_PIN Pin_1
234 #define BUTTON_B_PORT GPIOB
235 #define BUTTON_B_PIN Pin_0
237 #define SPEKTRUM_BIND
239 #define BIND_PORT GPIOB
240 #define BIND_PIN Pin_11
242 #define HARDWARE_BIND_PLUG
243 #define BINDPLUG_PORT BUTTON_B_PORT
244 #define BINDPLUG_PIN BUTTON_B_PIN
246 #define USE_SERIAL_4WAY_BLHELI_INTERFACE