mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Tidied UART enum definitions
This commit is contained in:
parent
bacc6e6fb1
commit
944fe0761c
34 changed files with 65 additions and 73 deletions
|
@ -173,7 +173,7 @@ static void handleUsartTxDma(dmaChannelDescriptor_t* descriptor)
|
|||
uartTryStartTxDMA(s);
|
||||
}
|
||||
|
||||
void serialUARTInitIO(IO_t txIO, IO_t rxIO, portMode_t mode, portOptions_t options, uint8_t af, uint8_t index)
|
||||
void serialUARTInitIO(IO_t txIO, IO_t rxIO, portMode_e mode, portOptions_e options, uint8_t af, uint8_t index)
|
||||
{
|
||||
if ((options & SERIAL_BIDIR) && txIO) {
|
||||
ioConfig_t ioCfg = IO_CONFIG(GPIO_Mode_AF, GPIO_Speed_50MHz,
|
||||
|
@ -202,16 +202,14 @@ void serialUARTInitIO(IO_t txIO, IO_t rxIO, portMode_t mode, portOptions_t optio
|
|||
|
||||
// XXX Should serialUART be consolidated?
|
||||
|
||||
uartPort_t *serialUART(UARTDevice device, uint32_t baudRate, portMode_t mode, portOptions_t options)
|
||||
uartPort_t *serialUART(UARTDevice_e device, uint32_t baudRate, portMode_e mode, portOptions_e options)
|
||||
{
|
||||
uartPort_t *s;
|
||||
|
||||
uartDevice_t *uartDev = uartDevmap[device];
|
||||
if (!uartDev) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
s = &(uartDev->port);
|
||||
uartPort_t *s = &(uartDev->port);
|
||||
s->port.vTable = uartVTable;
|
||||
|
||||
s->port.baudRate = baudRate;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue