From 74819c86a2897de899b978e208cbb3677f1f4bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Tue, 3 Mar 2015 10:30:35 +0100 Subject: [PATCH] ensure transmission is completed --- lib/uart.c | 26 ++++++++++++++------------ lib/uart.h | 2 +- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/uart.c b/lib/uart.c index b0be220..1639394 100644 --- a/lib/uart.c +++ b/lib/uart.c @@ -30,31 +30,33 @@ FILE uart_io = FDEV_SETUP_STREAM((int (*)(char, struct __file *)) uart_putchar, /* configure serial port */ void uart_init(void) { - UBRR0H = UBRRH_VALUE; - UBRR0L = UBRRL_VALUE; + UBRR0H = UBRRH_VALUE; // set baurate (calculated from BAUD) + UBRR0L = UBRRL_VALUE; // set baurate (calculated from BAUD) #if USE_2X - UCSR0A |= (1<