mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Handle USART TX pulldown (#12929)
SA is always unidirectional Only switch AT32 TX line to input when transmission is complete
This commit is contained in:
parent
6ba117d69e
commit
1333771140
8 changed files with 20 additions and 25 deletions
|
@ -309,7 +309,7 @@ uartPort_t *serialUART(UARTDevice_e device, uint32_t baudRate, portMode_e mode,
|
|||
if ((mode & MODE_TX) && txIO) {
|
||||
IOInit(txIO, OWNER_SERIAL_TX, RESOURCE_INDEX(device));
|
||||
|
||||
if ((options & SERIAL_INVERTED) == SERIAL_NOT_INVERTED) {
|
||||
if (((options & SERIAL_INVERTED) == SERIAL_NOT_INVERTED) && !(options & SERIAL_BIDIR_PP_PD)) {
|
||||
uartdev->txPinState = TX_PIN_ACTIVE;
|
||||
// Switch TX to an input with pullup so it's state can be monitored
|
||||
uartTxMonitor(s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue