// Wait for the serial port to be ready, to make sure both the transmit FIFO\r
// and shift register empty.\r
//\r
- while ((SerialPortReadRegister (SerialRegisterBase, R_UART_LSR) & B_UART_LSR_TEMT) == 0);\r
+ while ((SerialPortReadRegister (SerialRegisterBase, R_UART_LSR) & (B_UART_LSR_TEMT | B_UART_LSR_TXRDY)) != (B_UART_LSR_TEMT | B_UART_LSR_TXRDY));\r
\r
//\r
// Fill then entire Tx FIFO\r