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