]> git.zerfleddert.de Git - rsbs2/blame_incremental - bmc/usart.c
firmware: fix firmware extraction
[rsbs2] / bmc / usart.c
... / ...
CommitLineData
1#include <avr/io.h>
2#include <stdio.h>
3
4#include "config.h"
5#include "usart.h"
6
7#ifdef DEBUG
8
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