/* * Copyright (C) 2009 Nicole Faerber * * This program 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 2 of the License, or * (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _UART_H_ #define _UART_H_ #include #include #include #include #include #include #include int open_uart(char *device, speed_t baud); int uart_get_fd(void); void put_uart(uint8_t ch); void write_uart(char *buf, int size); uint8_t get_uart(uint8_t *ch); int uart_read(char *rxbuf, int maxlen); void close_uart(void); #endif