* 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?!?!?).
This commit is contained in:
Stu Grossman
1995-03-07 09:03:37 +00:00
parent 7baea94608
commit 85c8b135fe
7 changed files with 121 additions and 1 deletions

View File

@@ -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. */