1
0
Fork 0
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:
Steve Evans 2023-07-02 21:09:00 +01:00 committed by GitHub
parent 6ba117d69e
commit 1333771140
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 20 additions and 25 deletions

View file

@ -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);