X-Git-Url: http://git.tdb.fi/?p=model-railway-devices.git;a=blobdiff_plain;f=common%2Fserial.c;h=a5e5cae98ecae7dd5b7a9db2f1a94aeae70f0d35;hp=2bf6901836064ece4517047dcb8d94f70838d99f;hb=2658995b11690b4d54409eb066020aba17395680;hpb=e511adf9fe534ee414427705745d6c85d205566e diff --git a/common/serial.c b/common/serial.c index 2bf6901..a5e5cae 100644 --- a/common/serial.c +++ b/common/serial.c @@ -11,6 +11,7 @@ void serial_init(uint16_t baud) baud = (F_CPU/16+baud/2)/baud-1; UBRR0H = baud>>8; UBRR0L = baud; + UCSR0A = 0; UCSR0C = BIT(UCSZ00) | BIT(UCSZ01); // 8N1 UCSR0B = BIT(RXEN0) | BIT(TXEN0) | BIT(RXCIE0); }