From acdd758e56e28f22846e7d34d87f5533c8682574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 8 Oct 2015 20:59:26 +0200 Subject: Add implementation of USART and more ground changes --- src/usart_baundrate_helper.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/usart_baundrate_helper.h (limited to 'src/usart_baundrate_helper.h') diff --git a/src/usart_baundrate_helper.h b/src/usart_baundrate_helper.h new file mode 100644 index 0000000..0271bdd --- /dev/null +++ b/src/usart_baundrate_helper.h @@ -0,0 +1,12 @@ +#include +UBRR0H = UBRRH_VALUE; +UBRR0L = UBRRL_VALUE; +#if USE_2X +UCSR0A |= _BV(U2X0); +#else +UCSR0A &= ~_BV(U2X0); +#endif +#undef BAUD +#undef UBRRH_VALUE +#undef UBRRL_VALUE +#undef USE_2X -- cgit v1.2.3