1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

fixes not working Ghost on F4xx (#12809)

* fixes not working Ghost on F4xx

* minor fix

In the original line that was replaced, this was IOCFG_AF_PP_UP.
This commit is contained in:
Homer 2023-05-14 17:11:42 +02:00 committed by GitHub
parent 223c2b3f5b
commit 1a9001f5cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -245,9 +245,11 @@ void uartTxMonitor(uartPort_t *s)
uartDevice_t *uart = container_of(s, uartDevice_t, port);
IO_t txIO = IOGetByTag(uart->tx.pin);
// Switch TX to an input with pullup so it's state can be monitored
uart->txPinState = TX_PIN_MONITOR;
IOConfigGPIO(txIO, IOCFG_IPU);
if (uart->txPinState == TX_PIN_ACTIVE) {
// Switch TX to an input with pullup so it's state can be monitored
uart->txPinState = TX_PIN_MONITOR;
IOConfigGPIO(txIO, IOCFG_IPU);
}
}
static void handleUsartTxDma(uartPort_t *s)
@ -335,7 +337,7 @@ uartPort_t *serialUART(UARTDevice_e device, uint32_t baudRate, portMode_e mode,
// Switch TX to an input with pullup so it's state can be monitored
uartTxMonitor(s);
} else {
IOConfigGPIOAF(txIO, IOCFG_AF_PP, hardware->af);
IOConfigGPIOAF(txIO, IOCFG_AF_PP_UP, hardware->af);
}
}