GDB (API)
|
00001 /* Generic serial interface functions. 00002 00003 Copyright (C) 2005-2013 Free Software Foundation, Inc. 00004 00005 This file is part of GDB. 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00019 00020 #ifndef SER_BASE_H 00021 #define SER_BASE_H 00022 00023 struct serial; 00024 struct ui_file; 00025 00026 extern int generic_readchar (struct serial *scb, int timeout, 00027 int (*do_readchar) (struct serial *scb, 00028 int timeout)); 00029 extern int ser_base_flush_output (struct serial *scb); 00030 extern int ser_base_flush_input (struct serial *scb); 00031 extern int ser_base_send_break (struct serial *scb); 00032 extern void ser_base_raw (struct serial *scb); 00033 extern serial_ttystate ser_base_get_tty_state (struct serial *scb); 00034 extern serial_ttystate ser_base_copy_tty_state (struct serial *scb, 00035 serial_ttystate ttystate); 00036 extern int ser_base_set_tty_state (struct serial *scb, 00037 serial_ttystate ttystate); 00038 extern void ser_base_print_tty_state (struct serial *scb, 00039 serial_ttystate ttystate, 00040 struct ui_file *stream); 00041 extern int ser_base_noflush_set_tty_state (struct serial *scb, 00042 serial_ttystate new_ttystate, 00043 serial_ttystate old_ttystate); 00044 extern int ser_base_setbaudrate (struct serial *scb, int rate); 00045 extern int ser_base_setstopbits (struct serial *scb, int rate); 00046 extern int ser_base_drain_output (struct serial *scb); 00047 00048 extern int ser_base_write (struct serial *scb, const void *buf, size_t count); 00049 00050 extern void ser_base_async (struct serial *scb, int async_p); 00051 extern int ser_base_readchar (struct serial *scb, int timeout); 00052 00053 #endif