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:
parent
9a38d8a9e1
commit
168469236b
12 changed files with 48 additions and 38 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue