1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

UARTClass fix for only-first-char-sent issue.

This commit is contained in:
Cristian Maglie 2011-11-14 13:17:38 +01:00
parent e8b62b34c8
commit 08adc54377

View File

@ -120,10 +120,8 @@ void UARTClass::flush( void )
void UARTClass::write( const uint8_t uc_data ) void UARTClass::write( const uint8_t uc_data )
{ {
/* Check if the transmitter is ready */ /* Check if the transmitter is ready */
if ( (_pUart->UART_SR & UART_SR_TXRDY) != UART_SR_TXRDY ) while ( (_pUart->UART_SR & UART_SR_TXRDY) != UART_SR_TXRDY )
{ ;
return ;
}
/* Send character */ /* Send character */
_pUart->UART_THR = uc_data ; _pUart->UART_THR = uc_data ;