]>
Commit | Line | Data |
---|---|---|
d6f38d0d MG |
1 | #include <avr/io.h> |
2 | #include <stdio.h> | |
3 | ||
4 | #include "usart.h" | |
5 | ||
594d42a7 MG |
6 | #ifdef DEBUG |
7 | ||
d6f38d0d MG |
8 | #define UBRR_VAL ((F_CPU+BAUD*8)/(BAUD*16)-1) |
9 | #define BAUD_REAL (F_CPU/(16*(UBRR_VAL+1))) | |
10 | #define BAUD_ERROR ((BAUD_REAL*1000)/BAUD) | |
11 | ||
12 | #if ((BAUD_ERROR<990) || (BAUD_ERROR>1010)) | |
13 |