1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

Added support for multiple serial inverters.

This commit is contained in:
Michael Keller 2017-01-13 14:11:25 +13:00 committed by mikeller
parent 71d3963fdb
commit 19c1709250
20 changed files with 112 additions and 64 deletions

View file

@ -36,15 +36,15 @@
#include "serial_uart_impl.h"
static void usartConfigurePinInversion(uartPort_t *uartPort) {
#if !defined(INVERTER) && !defined(STM32F303xC)
#if !defined(USE_INVERTER) && !defined(STM32F303xC)
UNUSED(uartPort);
#else
bool inverted = uartPort->port.options & SERIAL_INVERTED;
#ifdef INVERTER
if (inverted && uartPort->USARTx == INVERTER_USART) {
#ifdef USE_INVERTER
if (inverted) {
// Enable hardware inverter if available.
INVERTER_ON;
enableInverter(uartPort->USARTx, true);
}
#endif