X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/rsbs2/blobdiff_plain/d6f38d0dfc4f602a6c790fd470deb2b2fd23da77..87f4338b452dea4fdebba3eac573bec999642eb9:/bmc/usart.c?ds=sidebyside diff --git a/bmc/usart.c b/bmc/usart.c index 36ba83c..f92edbd 100644 --- a/bmc/usart.c +++ b/bmc/usart.c @@ -3,6 +3,8 @@ #include "usart.h" +#ifdef DEBUG + #define UBRR_VAL ((F_CPU+BAUD*8)/(BAUD*16)-1) #define BAUD_REAL (F_CPU/(16*(UBRR_VAL+1))) #define BAUD_ERROR ((BAUD_REAL*1000)/BAUD) @@ -22,9 +24,11 @@ int usart_put(char c, FILE *stream) } static FILE usart_stdout = FDEV_SETUP_STREAM(usart_put, NULL, _FDEV_SETUP_WRITE); +#endif void usart_init() { +#ifdef DEBUG UCSRB |= (1<