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
1 changed files with 2 additions and 4 deletions

View File

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