mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Stop using uint8_t to determine if bytes are available from USB. If we buffer more than that we'll never be able to read it all.
This commit is contained in:
parent
fefd34d05a
commit
a4e5e30152
4 changed files with 11 additions and 11 deletions
|
@ -38,7 +38,7 @@
|
|||
|
||||
typedef struct {
|
||||
serialPort_t port;
|
||||
|
||||
|
||||
#ifdef STM32F4
|
||||
DMA_Stream_TypeDef *rxDMAStream;
|
||||
DMA_Stream_TypeDef *txDMAStream;
|
||||
|
@ -65,7 +65,7 @@ serialPort_t *uartOpen(USART_TypeDef *USARTx, serialReceiveCallbackPtr callback,
|
|||
|
||||
// serialPort API
|
||||
void uartWrite(serialPort_t *instance, uint8_t ch);
|
||||
uint8_t uartTotalRxBytesWaiting(serialPort_t *instance);
|
||||
uint32_t uartTotalRxBytesWaiting(serialPort_t *instance);
|
||||
uint8_t uartTotalTxBytesFree(serialPort_t *instance);
|
||||
uint8_t uartRead(serialPort_t *instance);
|
||||
void uartSetBaudRate(serialPort_t *s, uint32_t baudRate);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue