* fhandler.h (class fhandler_serial): Add new members of
the class - rts,dtr and method ioctl(). Variables rts and dtr important for Win 9x only. * fhandler_serial.cc (fhandler_serial::open): Add initial setting of dtr and rts. Important for Win 9x only. (fhandler_serial::ioctl): New function. Implements commands TIOCMGET, TIOCMSET and TIOCINQ. (fhandler_serial::tcflush): Fixed found error. (fhandler_serial::tcsetattr): Add settings of rts and dtr. Important for Win 9x only. * termios.h: Add new defines as a support for ioctl() function on serial device.
This commit is contained in:
		@@ -13,6 +13,26 @@ details. */
 | 
			
		||||
#ifndef	_SYS_TERMIOS_H
 | 
			
		||||
#define _SYS_TERMIOS_H
 | 
			
		||||
 | 
			
		||||
#define	TIOCMGET	0x5415
 | 
			
		||||
#define	TIOCMSET	0x5418
 | 
			
		||||
#define	TIOCINQ		0x541B	
 | 
			
		||||
 | 
			
		||||
/* TIOCINQ is utilized instead of FIONREAD which has been
 | 
			
		||||
accupied for other purposes under CYGWIN.
 | 
			
		||||
Other UNIX ioctl requests has been omited because
 | 
			
		||||
effects of their work one can achive by standard
 | 
			
		||||
POSIX commands */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#define	TIOCM_DTR	0x002
 | 
			
		||||
#define	TIOCM_RTS	0x004
 | 
			
		||||
#define	TIOCM_CTS	0x020
 | 
			
		||||
#define	TIOCM_CAR	0x040
 | 
			
		||||
#define	TIOCM_RNG	0x080
 | 
			
		||||
#define	TIOCM_DSR	0x100
 | 
			
		||||
#define	TIOCM_CD	TIOCM_CAR
 | 
			
		||||
#define	TIOCM_RI	TIOCM_RNG
 | 
			
		||||
 | 
			
		||||
#define TCOOFF		0
 | 
			
		||||
#define TCOON		1
 | 
			
		||||
#define TCIOFF		2
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user