Fix for missing F7 push pull
This commit is contained in:
parent
5353c136d1
commit
b512f006ca
|
@ -341,9 +341,14 @@ uartPort_t *serialUART(UARTDevice device, uint32_t baudRate, portMode_t mode, po
|
|||
IO_t rxIO = IOGetByTag(uartdev->rx);
|
||||
|
||||
if ((options & SERIAL_BIDIR) && txIO) {
|
||||
// XXX BIDIR_PP handling is missing
|
||||
ioConfig_t ioCfg = IO_CONFIG(
|
||||
((options & SERIAL_INVERTED) || (options & SERIAL_BIDIR_PP)) ? GPIO_MODE_AF_PP : GPIO_MODE_AF_OD,
|
||||
GPIO_SPEED_FREQ_HIGH,
|
||||
((options & SERIAL_INVERTED) || (options & SERIAL_BIDIR_PP)) ? GPIO_PULLDOWN : GPIO_PULLUP
|
||||
);
|
||||
|
||||
IOInit(txIO, OWNER_SERIAL_TX, RESOURCE_INDEX(device));
|
||||
IOConfigGPIOAF(txIO, IOCFG_AF_PP, hardware->af);
|
||||
IOConfigGPIOAF(txIO, ioCfg, hardware->af);
|
||||
}
|
||||
else {
|
||||
if ((mode & MODE_TX) && txIO) {
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include "drivers/io.h"
|
||||
#include "drivers/dma.h"
|
||||
|
|
Loading…
Reference in New Issue