1
0
Fork 0
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:
Dominic Clifton 2014-04-07 16:39:09 +01:00
parent 1051cbcf52
commit ac0f3e9186
12 changed files with 169 additions and 64 deletions

View file

@ -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,
}
};