2016-09-26 16:39:07 +03:00
|
|
|
#ifndef _UART_H_
|
|
|
|
#define _UART_H_
|
|
|
|
|
2016-09-10 00:56:05 +03:00
|
|
|
int uart0_putchar(char c, FILE *stream);
|
|
|
|
int uart0_getchar(FILE *stream);
|
2016-09-10 00:23:43 +03:00
|
|
|
|
2016-09-10 00:56:05 +03:00
|
|
|
int uart3_putchar(char c, FILE *stream);
|
|
|
|
|
|
|
|
void uart0_init(void);
|
|
|
|
void uart3_init(void);
|
2016-09-10 00:23:43 +03:00
|
|
|
|
|
|
|
/* http://www.ermicro.com/blog/?p=325 */
|
|
|
|
|
2016-09-10 00:56:05 +03:00
|
|
|
FILE uart0_io = FDEV_SETUP_STREAM(uart0_putchar, uart0_getchar, _FDEV_SETUP_RW);
|
|
|
|
FILE uart3_out = FDEV_SETUP_STREAM(uart3_putchar, NULL, _FDEV_SETUP_WRITE);
|
2016-09-26 16:39:07 +03:00
|
|
|
|
|
|
|
#endif /* _UART_H_ */
|