1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

CC3D / NAZE - Adding support for hardware controlled inverter for use by

SBUS RX.
This commit is contained in:
Dominic Clifton 2014-08-01 23:36:42 +01:00
parent f08760634e
commit 4d9a672d9c
8 changed files with 103 additions and 1 deletions

View file

@ -28,6 +28,9 @@
#include "build_config.h"
#include "gpio.h"
#include "inverter.h"
#include "serial.h"
#include "serial_uart.h"
@ -64,6 +67,13 @@ serialPort_t *uartOpen(USART_TypeDef *USARTx, serialReceiveCallbackPtr callback,
uartPort_t *s = NULL;
#ifdef INVERTER
if (inversion == SERIAL_INVERTED && USARTx == INVERTER_USART) {
// Enable hardware inverter if available.
INVERTER_ON;
}
#endif
if (USARTx == USART1) {
s = serialUSART1(baudRate, mode);
} else if (USARTx == USART2) {