mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 21:35:44 +03:00
Made serial const correct
This commit is contained in:
parent
7316a589f3
commit
661aa7469d
6 changed files with 24 additions and 24 deletions
|
@ -291,9 +291,9 @@ void uartStartTxDMA(uartPort_t *s)
|
|||
#endif
|
||||
}
|
||||
|
||||
uint32_t uartTotalRxBytesWaiting(serialPort_t *instance)
|
||||
uint32_t uartTotalRxBytesWaiting(const serialPort_t *instance)
|
||||
{
|
||||
uartPort_t *s = (uartPort_t*)instance;
|
||||
const uartPort_t *s = (const uartPort_t*)instance;
|
||||
#ifdef STM32F4
|
||||
if (s->rxDMAStream) {
|
||||
uint32_t rxDMAHead = s->rxDMAStream->NDTR;
|
||||
|
@ -315,9 +315,9 @@ uint32_t uartTotalRxBytesWaiting(serialPort_t *instance)
|
|||
}
|
||||
}
|
||||
|
||||
uint32_t uartTotalTxBytesFree(serialPort_t *instance)
|
||||
uint32_t uartTotalTxBytesFree(const serialPort_t *instance)
|
||||
{
|
||||
uartPort_t *s = (uartPort_t*)instance;
|
||||
const uartPort_t *s = (const uartPort_t*)instance;
|
||||
|
||||
uint32_t bytesUsed;
|
||||
|
||||
|
@ -358,9 +358,9 @@ uint32_t uartTotalTxBytesFree(serialPort_t *instance)
|
|||
return (s->port.txBufferSize - 1) - bytesUsed;
|
||||
}
|
||||
|
||||
bool isUartTransmitBufferEmpty(serialPort_t *instance)
|
||||
bool isUartTransmitBufferEmpty(const serialPort_t *instance)
|
||||
{
|
||||
uartPort_t *s = (uartPort_t *)instance;
|
||||
const uartPort_t *s = (const uartPort_t *)instance;
|
||||
#ifdef STM32F4
|
||||
if (s->txDMAStream)
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue