]> defiant.homedns.org Git - ros_wild_thumper.git/blobdiff - avr/nano/uart.c
misc avr fixes
[ros_wild_thumper.git] / avr / nano / uart.c
index 1a3707a781ba3dcab4d28c1df79b214207489ace..6fb768fd486128350c491eb606c2003da431888d 100644 (file)
@@ -20,9 +20,9 @@ ISR(USART_RX_vect) {
 
 
 void setup_uart(unsigned int rate) {
 
 
 void setup_uart(unsigned int rate) {
-       UCSR0B |= (1<<TXEN0) | (1<<RXEN0); // UART TX & RX
+       UCSR0B = (1<<TXEN0) | (1<<RXEN0); // UART TX & RX
        UCSR0B |= (1<<RXCIE0);          // RX Interrupt
        UCSR0B |= (1<<RXCIE0);          // RX Interrupt
-       UCSR0C |= (3<<UCSZ00); // Asynchron 8N1
+       UCSR0C = (3<<UCSZ00); // Asynchron 8N1
 
        UBRR0H = (uint8_t)(UART_UBRR_CALC(rate, F_CPU) >> 8);
        UBRR0L = (uint8_t)UART_UBRR_CALC(rate, F_CPU);
 
        UBRR0H = (uint8_t)(UART_UBRR_CALC(rate, F_CPU) >> 8);
        UBRR0L = (uint8_t)UART_UBRR_CALC(rate, F_CPU);