avr: initial commit
[z80.git] / avr / uart.h
1 /* UART header */
2 #ifndef _UART_H_
3 #define _UART_H_
4
5 #include <stdio.h>
6
7 #define BAUDRATE        9600UL
8 #define UART_TXBUFSIZE  16
9 #define UART_RXBUFSIZE  16
10
11 extern FILE uart_out;
12 extern FILE uart_in;
13
14 extern volatile uint8_t uart_break;
15 extern volatile uint8_t uart_echo;
16
17 void uart_init(void);
18 int  uart_putc(char c, FILE *stream);
19 int  uart_getc(FILE *stream);
20
21 uint8_t uart_rx_state(void);
22 uint8_t uart_tx_state(void);
23
24 #endif /* _UART_H_ */