1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-21 07:15:18 +03:00

SERIAL_BIDIR_PP option

Required for SmartAudio Support with single wire connection and without
external pull-up.

Tested with F3 only. F1 and F4 has untested mods, and Softserial
haven’t been touched.
This commit is contained in:
jflyper 2016-10-05 01:11:10 +09:00
parent f5dd171c8c
commit c724b7c4ee
3 changed files with 20 additions and 6 deletions

View file

@ -336,7 +336,10 @@ uartPort_t *serialUART(UARTDevice device, uint32_t baudRate, portMode_t mode, po
if (options & SERIAL_BIDIR) {
IOInit(tx, OWNER_SERIAL, RESOURCE_UART_TXRX, RESOURCE_INDEX(device));
IOConfigGPIOAF(tx, IOCFG_AF_OD, uart->af);
if (options & SERIAL_BIDIR_PP)
IOConfigGPIOAF(tx, IOCFG_AF_PP, uart->af);
else
IOConfigGPIOAF(tx, IOCFG_AF_OD, uart->af);
}
else {
if (mode & MODE_TX) {