Ensure TXC1 is clear

main^2
Michael Hayes 12 years ago
parent 7197f66d8d
commit f8fd547dfb

@ -64,13 +64,17 @@ usart1_write_finished_p (void)
/** Write character to USART1. This blocks until the character can be
written into transmit register. */
written into the transmit register. */
void
usart1_putc (char ch)
{
while (!usart1_write_ready_p ())
continue;
/* Write a 1 to the TXC1 bit to clear it! It will be set when the
data is shifted out of the transmit shift register. */
UCSR1A |= BIT (TXC1);
UDR1 = ch;
}

@ -44,7 +44,7 @@ usart1_write_finished_p (void);
/** Write character to USART1. This blocks until the character can be
written into transmit register. */
written into the transmit register. */
void
usart1_putc (char ch);

Loading…
Cancel
Save