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:
parent
f08760634e
commit
4d9a672d9c
8 changed files with 103 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue