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:
parent
71d3963fdb
commit
19c1709250
20 changed files with 112 additions and 64 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue