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 eff20de commit 76280e8Copy full SHA for 76280e8
hardware/arduino/sam/cores/arduino/UARTClass.cpp
@@ -141,7 +141,7 @@ void UARTClass::flush( void )
141
142
size_t UARTClass::write( const uint8_t uc_data )
143
{
144
- if ((_pUart->UART_SR & UART_SR_TXRDY) != UART_SR_TXRDY) //is the hardware currently busy?
+ if (((_pUart->UART_SR & UART_SR_TXRDY) != UART_SR_TXRDY) | (_tx_buffer->_iTail != _tx_buffer->_iHead)) //is the hardware currently busy?
145
146
//if busy we buffer
147
unsigned int l = (_tx_buffer->_iHead + 1) % SERIAL_BUFFER_SIZE;
0 commit comments