summaryrefslogtreecommitdiff
path: root/gdb/serial.h
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1995-03-07 09:03:37 +0000
committerStu Grossman <grossman@cygnus>1995-03-07 09:03:37 +0000
commit85c8b135fe413021e644dbd69a56ae7abe455f2e (patch)
treef034a40857e4f3eff1176ea6664b8967e6674051 /gdb/serial.h
parent7baea9460866303161d1598eddb93a936973ef1d (diff)
downloadbinutils-85c8b135fe413021e644dbd69a56ae7abe455f2e.tar.gz
binutils-85c8b135fe413021e644dbd69a56ae7abe455f2e.tar.bz2
binutils-85c8b135fe413021e644dbd69a56ae7abe455f2e.zip
* serial.h ser-go32.c ser-go32-para.c ser-mac.c ser-tcp.c
ser-unix.c: Add SERIAL_SETSTOPBITS to set the number of stopbits (needed for IDP board?!?!?).
Diffstat (limited to 'gdb/serial.h')
-rw-r--r--gdb/serial.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/serial.h b/gdb/serial.h
index 9e669cbb2bb..2dbb1aa8835 100644
--- a/gdb/serial.h
+++ b/gdb/serial.h
@@ -57,6 +57,7 @@ struct serial_ops {
int (*noflush_set_tty_state)
PARAMS ((serial_t, serial_ttystate, serial_ttystate));
int (*setbaudrate) PARAMS ((serial_t, int rate));
+ int (*setstopbits) PARAMS ((serial_t, int num));
};
/* Add a new serial interface to the interface list */
@@ -139,6 +140,15 @@ serial_t serial_fdopen PARAMS ((const int fd));
#define SERIAL_SETBAUDRATE(SERIAL_T, RATE) ((SERIAL_T)->ops->setbaudrate((SERIAL_T), RATE))
+/* Set the number of stop bits to the value specified. Returns 0 for success,
+ -1 for failure. */
+
+#define SERIAL_1_STOPBITS 1
+#define SERIAL_1_AND_A_HALF_STOPBITS 2 /* 1.5 bits, snicker... */
+#define SERIAL_2_STOPBITS 3
+
+#define SERIAL_SETSTOPBITS(SERIAL_T, NUM) ((SERIAL_T)->ops->setstopbits((SERIAL_T), NUM))
+
/* Write LEN chars from STRING to the port SERIAL_T. Returns 0 for
success, non-zero for failure. */