#ifndef _UART_H_
#define _UART_H_

#include <avr/io.h>

typedef struct
{
   volatile unsigned char rx_error;         // 1 = empfang: error flag
   volatile unsigned char tx_busy ;         // 1 = Sender busy 
   volatile unsigned char usart_ready:1;
   volatile unsigned char usart_rx_ovl:1;   
   volatile unsigned char usart_disable:1;  //benötigt für ftp2com   
} S_UART;

void uart_init( void );
int  uart_putc( const unsigned char );
void start_tx( void );
int  uart_getc( void );
int usart_write_str(char *str);

#ifdef USART_WRITE_P                         // 09.06.2012 muss in der makefile definiert sein 
void usart_write_P (const char *Buffer,...);
#define usart_write(format, args...)   usart_write_P(PSTR(format) , ## args)
#endif

#endif /* _UART_H_ */
