]> www.fi.muni.cz Git - openparking.git/blobdiff - firmware/rs485.c
RS485 xmit fixes
[openparking.git] / firmware / rs485.c
index 7aec92c8e54a4abf1f31691b411e44a5aac4a167..7c9032452930f221ab4c2f0fe0d9468dcd02f459 100644 (file)
@@ -108,6 +108,7 @@ ISR(USART_UDRE_vect)
 {
        cli();
        if (tx_head == tx_tail) {
+               UCSR0A |= _BV(TXC0); // clear the pending TXC flag
                UCSR0B |= _BV(TXCIE0); // enable xmit complete irq
                UCSR0B &= ~_BV(UDRIE0);
        } else {