1
0
Fork 0
i237/src/uart_wrap.h

33 lines
1.2 KiB
C

/* Copyright (C) 2016 Arti Zirk <arti.zirk@gmail.com>
*
* This file is part of I237 Door Access program.
*
* I237 Door Access is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* I237 Door Access is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with I237 Door Access. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _UART_WRAP_H_
#define _UART_WRAP_H_
int uart0_putc_wrap(char c, FILE *stream);
int uart0_getc_wrap(FILE *stream);
int uart3_putc_wrap(char c, FILE *stream);
/* http://www.ermicro.com/blog/?p=325 */
FILE uart0_io = FDEV_SETUP_STREAM(uart0_putc_wrap, uart0_getc_wrap, _FDEV_SETUP_RW);
FILE uart3_out = FDEV_SETUP_STREAM(uart3_putc_wrap, NULL, _FDEV_SETUP_WRITE);
#endif /* _UART_WRAP_H_ */