We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 860b104 commit 054e6b3Copy full SHA for 054e6b3
cores/esp32/esp32-hal-uart.c
@@ -238,6 +238,10 @@ uint32_t uartAvailableForWrite(uart_t* uart)
238
}
239
UART_MUTEX_LOCK();
240
uint32_t available = uart_ll_get_txfifo_len(UART_LL_GET_HW(uart->num));
241
+ size_t txRingBufferAvailable = 0;
242
+ if (ESP_OK == uart_get_tx_buffer_free_size(uart->num, &txRingBufferAvailable)) {
243
+ available += txRingBufferAvailable;
244
+ }
245
UART_MUTEX_UNLOCK();
246
return available;
247
0 commit comments