mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +03:00
Move port telemetry port configuration logic into common telemetry code.
Update software serial to support RX, TX or RX&TX modes. Update serial API to allow on-the-fly changing of serial port mode. Update HoTT to change serial port mode when transmitting.
This commit is contained in:
parent
1051cbcf52
commit
ac0f3e9186
12 changed files with 169 additions and 64 deletions
|
@ -202,6 +202,12 @@ void uartSetBaudRate(serialPort_t *instance, uint32_t baudRate)
|
|||
s->port.baudRate = baudRate;
|
||||
}
|
||||
|
||||
void uartSetMode(serialPort_t *s, portMode_t mode)
|
||||
{
|
||||
// not implemented.
|
||||
}
|
||||
|
||||
|
||||
static void uartStartTxDMA(uartPort_t *s)
|
||||
{
|
||||
s->txDMAChannel->CMAR = (uint32_t)&s->port.txBuffer[s->port.txBufferTail];
|
||||
|
@ -273,7 +279,8 @@ const struct serialPortVTable uartVTable[] = {
|
|||
uartTotalBytesWaiting,
|
||||
uartRead,
|
||||
uartSetBaudRate,
|
||||
isUartTransmitBufferEmpty
|
||||
isUartTransmitBufferEmpty,
|
||||
uartSetMode,
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue