Date: Sat, 13 May 2000 15:49:51 +0200 (MEST)
From: Marc SCHAEFER <[EMAIL PROTECTED]>
Is it possible to use the POSIX interface to ttys (e.g. serial port), for
example select(), to be awaken when modem control signal change ?
An application would be a special protocol where RTS, CTS, DSR, DTR lines
are used as communication and special handshake lines, without specific
delay needs. The protocol is specific and can't be changed.
It would be possible to implement polling (ie busy waiting), but that's a
bit strange since I think the hardware supports interrupt reporting.
The TIOCMIWAIT ioctl can be used to do this. You pass it a mask of
which lines you're interested in, using the bitmask definitions used by
TIOCMGET. TIOCGICOUNT can be used to count to determine which line(s)
changed while the process was sleeping.
That being said, these interface (and those RS-232 lines) weren't
designed for protocol work, and it's possible it might miss a
transition.
- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to [EMAIL PROTECTED]