Flip serial TX code around a bit
authorKeith Packard <keithp@keithp.com>
Wed, 25 Mar 2009 07:13:15 +0000 (00:13 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 25 Mar 2009 07:13:15 +0000 (00:13 -0700)
target/serial/serial.c

index ecf065a2a83518abfbe6a5da3151003b89a923fb..d2be47fdeb1ed7cd9f53dce9b3e8d9ae258691fa 100644 (file)
@@ -194,16 +194,16 @@ usart_init(void)
                 UxUCR_PARITY_DISABLE |
                 UxUCR_SPB_1_STOP_BIT |
                 UxUCR_STOP_HIGH |
                 UxUCR_PARITY_DISABLE |
                 UxUCR_SPB_1_STOP_BIT |
                 UxUCR_STOP_HIGH |
-                UxUCR_START_HIGH);
+                UxUCR_START_LOW);
 }
 
 void
 usart_out_byte(uint8_t byte)
 {
 }
 
 void
 usart_out_byte(uint8_t byte)
 {
-       U1CSR &= ~UxCSR_TX_BYTE;
        U1DBUF = byte;
        while ((U1CSR & UxCSR_TX_BYTE) == 0)
                ;
        U1DBUF = byte;
        while ((U1CSR & UxCSR_TX_BYTE) == 0)
                ;
+       U1CSR &= ~UxCSR_TX_BYTE;
 }
 
 uint8_t
 }
 
 uint8_t