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. */
20 /* Return a sensible default name for a serial device, something which
21 can be used as an argument to serial_open */
23 CONST
char *EXFUN(serial_default_name
,(void));
25 /* Try to open the serial device "name", return 1 if ok, 0 if not. */
27 int EXFUN(serial_open
,(CONST
char *name
));
29 /* Turn the port into raw mode */
31 void EXFUN(serial_raw
,(void));
34 /* Turn the port into normal mode */
36 void EXFUN(serial_normal
,(void));
39 /* Read one char from the serial device with timeout, return char, and
42 int EXFUN(serial_timedreadchar
,(int to
, int *ok
));
45 /* Set the baudrate to the value supplied, and return 1, or fail and
48 int EXFUN(serial_setbaudrate
,(int to
));
50 /* Return the next rate in the sequence, or return 0 for a fail*/
52 int EXFUN(serial_nextbaudrate
,(int rate
));
55 /* Write some chars to the device, return 1 if ok, 0 if not */
57 int EXFUN(serial_write
,( CONST
char *str
, int len
));
60 /* Close the serial port */
62 int EXFUN(serial_close
,(void));