mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 05:45:31 +03:00
fix at32 serial bidir pp od init and smart audio (#13764)
include fix for F4 and G4 as well Co-authored-by: Eike Ahmels <ea@weslink.de>
This commit is contained in:
parent
1bcde73c3c
commit
ee9172f4da
4 changed files with 7 additions and 3 deletions
|
@ -337,7 +337,9 @@ uartPort_t *serialUART(UARTDevice_e device, uint32_t baudRate, portMode_e mode,
|
|||
|
||||
if (options & SERIAL_BIDIR) {
|
||||
IOInit(txIO, OWNER_SERIAL_TX, RESOURCE_INDEX(device));
|
||||
IOConfigGPIOAF(txIO, ((options & SERIAL_BIDIR_PP) || (options & SERIAL_BIDIR_PP_PD)) ? IOCFG_AF_PP : IOCFG_AF_OD, hardware->af);
|
||||
IOConfigGPIOAF(txIO, (options & SERIAL_BIDIR_PP_PD) ? IOCFG_AF_PP_PD
|
||||
: (options & SERIAL_BIDIR_PP) ? IOCFG_AF_PP
|
||||
: IOCFG_AF_OD, hardware->af);
|
||||
} else {
|
||||
if ((mode & MODE_TX) && txIO) {
|
||||
IOInit(txIO, OWNER_SERIAL_TX, RESOURCE_INDEX(device));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue