1
0
Fork 0
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:
Benedikt Kleiner 2024-07-15 11:57:09 +02:00 committed by GitHub
parent 1bcde73c3c
commit ee9172f4da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 3 deletions

View file

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