mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-29 10:17:15 +02:00
HardwareSerial - availableForWrite() support (#1226)
* HardwareSerial - availableForWrite() support * fix indentation errors (tab vs space)
This commit is contained in:
@ -248,6 +248,14 @@ uint32_t uartAvailable(uart_t* uart)
|
||||
return uxQueueMessagesWaiting(uart->queue);
|
||||
}
|
||||
|
||||
uint32_t uartAvailableForWrite(uart_t* uart)
|
||||
{
|
||||
if(uart == NULL) {
|
||||
return 0;
|
||||
}
|
||||
return 0x7f - uart->dev->status.txfifo_cnt;
|
||||
}
|
||||
|
||||
uint8_t uartRead(uart_t* uart)
|
||||
{
|
||||
if(uart == NULL || uart->queue == NULL) {
|
||||
|
Reference in New Issue
Block a user