mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 23:05:19 +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:
parent
223c2b3f5b
commit
1a9001f5cd
1 changed files with 6 additions and 4 deletions
|
@ -245,9 +245,11 @@ void uartTxMonitor(uartPort_t *s)
|
||||||
uartDevice_t *uart = container_of(s, uartDevice_t, port);
|
uartDevice_t *uart = container_of(s, uartDevice_t, port);
|
||||||
IO_t txIO = IOGetByTag(uart->tx.pin);
|
IO_t txIO = IOGetByTag(uart->tx.pin);
|
||||||
|
|
||||||
// Switch TX to an input with pullup so it's state can be monitored
|
if (uart->txPinState == TX_PIN_ACTIVE) {
|
||||||
uart->txPinState = TX_PIN_MONITOR;
|
// Switch TX to an input with pullup so it's state can be monitored
|
||||||
IOConfigGPIO(txIO, IOCFG_IPU);
|
uart->txPinState = TX_PIN_MONITOR;
|
||||||
|
IOConfigGPIO(txIO, IOCFG_IPU);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handleUsartTxDma(uartPort_t *s)
|
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
|
// Switch TX to an input with pullup so it's state can be monitored
|
||||||
uartTxMonitor(s);
|
uartTxMonitor(s);
|
||||||
} else {
|
} else {
|
||||||
IOConfigGPIOAF(txIO, IOCFG_AF_PP, hardware->af);
|
IOConfigGPIOAF(txIO, IOCFG_AF_PP_UP, hardware->af);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue