/*
 * uart.h
 *
 * Created: 20.02.2019 20:50:01
 *  Author: jens
 */ 


#ifndef UART_H_
#define UART_H_

#include "machine.h"
#include "fifo.h"

#define UART_PRESCALE(baudrate, smpPerBit) ((5+ 10*F_CPU / (baudrate*smpPerBit) - 1)/10)

void uart_init(Fifo *pFifo, uint32_t baudrate);
void uart_putc(char c);
int uart_putchar(char c, FILE *stream);
void uart_puts(char const *str);


#endif /* UART_H_ */