6a1f2e2683718ec34ff4505cfd6123973ddf1d38
1 /* Remote serial support interface definitions for GDB, the GNU Debugger.
2 Copyright 1992 Free Software Foundation, Inc.
4 This file is part of GDB.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
27 int flags
; /* Flags from fcntl F_GETFL */
28 struct termios termios
; /* old tty driver settings */
31 #else /* not HAVE_TERMIO */
36 int flags
; /* Flags from fcntl F_GETFL */
37 struct sgttyb sgttyb
; /* old tty driver settings */
40 #endif /* not HAVE_TERMIO */
41 /* Return a sensible default name for a serial device, something which
42 can be used as an argument to serial_open. */
44 const char *serial_default_name
PARAMS ((void));
46 /* Try to open the serial device "name", return 1 if ok, 0 if not. */
48 int serial_open
PARAMS ((const char *name
));
50 /* Turn the port into raw mode. */
52 void serial_raw
PARAMS ((int fd
, struct ttystate
*oldstate
));
54 /* Turn the port into normal mode. */
56 void serial_normal
PARAMS ((void));
58 /* Read one char from the serial device with <TO>-second timeout.
59 Returns char if ok, else EOF, -2 for timeout, -3 for anything else */
61 int serial_readchar
PARAMS ((int to
));
63 /* Set the baudrate to the decimal value supplied, and return 1, or fail and
66 int serial_setbaudrate
PARAMS ((int rate
));
68 /* Return the next rate in the sequence, or return 0 for failure. */
70 /* Write some chars to the device, returns 0 for failure. See errno for
73 int serial_write
PARAMS ((const char *str
, int len
));
75 /* Close the serial port */
77 void serial_close
PARAMS ((void));
79 /* Restore the serial port to the state saved in oldstate */
81 void serial_restore
PARAMS ((int desc
, struct ttystate oldstate
));
This page took 0.031112 seconds and 3 git commands to generate.