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

Tidied serial and telemetry files

This commit is contained in:
Martin Budden 2016-08-01 06:45:59 +01:00
parent 9a38d8a9e1
commit 168469236b
12 changed files with 48 additions and 38 deletions

View file

@ -298,7 +298,7 @@ uint32_t uartTotalRxBytesWaiting(serialPort_t *instance)
if (s->rxDMAStream) {
uint32_t rxDMAHead = s->rxDMAStream->NDTR;
#else
if (s->rxDMAChannel) {
if (s->rxDMAChannel) {
uint32_t rxDMAHead = s->rxDMAChannel->CNDTR;
#endif
if (rxDMAHead >= s->rxDMAPos) {
@ -421,13 +421,13 @@ void uartWrite(serialPort_t *instance, uint8_t ch)
const struct serialPortVTable uartVTable[] = {
{
uartWrite,
uartTotalRxBytesWaiting,
uartTotalTxBytesFree,
uartRead,
uartSetBaudRate,
isUartTransmitBufferEmpty,
uartSetMode,
.serialWrite = uartWrite,
.serialTotalRxWaiting = uartTotalRxBytesWaiting,
.serialTotalTxFree = uartTotalTxBytesFree,
.serialRead = uartRead,
.serialSetBaudRate = uartSetBaudRate,
.isSerialTransmitBufferEmpty = isUartTransmitBufferEmpty,
.setMode = uartSetMode,
.writeBuf = NULL,
.beginWrite = NULL,
.endWrite = NULL,