/*
 * usart.h
 *
 * Created: 10.4.2012 13:36:33
 *  Author: Kain
 */


#ifndef USART_H_
#define USART_H_
#include <avr/io.h>

#define BAUD_RATE       800                            // Otestovat, ale max cca 1200
#define BAUD_RATE_UBRR  (F_CPU/16/BAUD_RATE - 1)        // Toto MUSI vyjit bez desetinneho zbytku - cele cislo!

#if ((F_CPU/16) % BAUD_RATE > 0)
#error "UBRR vychazi v desetinnych cislech = error rate > 0%, je potreba zmenit BAUD RATE"	//pojistka na chybu
#endif

void USART_init(void);
void USART_writeBytes(uint8_t * data, uint16_t count);
void USART_write(uint8_t );


#endif /* USART_H_ */
