From: "Frédéric Maria" <frederic.maria-GANU6spQydw@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Patch on man4/tty_ioctl.4 regarding TIOCMIWAIT & TIOCGICOUNT
Date: Mon, 09 Feb 2009 11:48:00 +0100 [thread overview]
Message-ID: <1234176480.499009e0c8303@imp.free.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 1994 bytes --]
Hello,
for a personal project I was interrested in using the wait for interrupt
capability of serial ports.
After searching for documentation I found very few data about the tty ioctl
commands: TIOCMIWAIT and TIOCGICOUNT.
Moreover this was not documented in man4/tty_ioctl.4 file.
So here is a possible patch to add quick information on TIOCMIWAIT and
TIOCGICOUNT commands.
This patch is against version 3.17 of the man pages.
Please do not hesitate to correct english terms as this is not my birth tongue.
Best regards
Fred
--- /home/fred/man-pages-3.17/man4/tty_ioctl.4 2009-01-19 05:14:02.000000000
+0100
+++ /home/fred/man-pages-3.17-new/man4/tty_ioctl.4 2009-02-09 10:20:43.363377700
+0100
@@ -349,18 +349,26 @@
.SS "Modem control"
.TP
.BI "TIOCMGET int *" argp
-get the status of modem bits.
+Get the status of modem bits.
.TP
.BI "TIOCMSET const int *" argp
-set the status of modem bits.
+Set the status of modem bits.
.TP
.BI "TIOCMBIC const int *" argp
-clear the indicated modem bits.
+Clear the indicated modem bits.
.TP
.BI "TIOCMBIS const int *" argp
-set the indicated modem bits.
+Set the indicated modem bits.
+.TP
+.BI "TIOCMIWAIT int " arg
+Wait for any of the 4 modem bits (DCD, RI, DSR, CTS) to change.
+The mask is passed in arg for bits of interest (use |'ed
+TIOCM_RNG/DSR/CD/CTS for masking).
+Caller should use
+.B TIOCGICOUNT
+to see which one it was.
.LP
-Bits used by these four ioctls:
+Bits used by these five ioctls:
.nf
TIOCM_LE DSR (data set ready/line enable)
@@ -375,6 +383,15 @@
TIOCM_RI see TIOCM_RNG
TIOCM_DSR DSR (data set ready)
.fi
+.TP
+.BI "TIOCGICOUNT struct serial_icounter_struct *" argp
+Get counter of input serial line interrupts (DCD, RI, DSR, CTS).
+Write counters to the user passed
+.I argp
+serial_icounter_struct structure.
+.br
+NB: both 1->0 and 0->1 transitions are counted except for
+RI where only 0->1 is counted.
.SS "Marking a line as local"
.TP
.BI "TIOCGSOFTCAR int *" argp
[-- Attachment #2: tty_ioctl.4.patch --]
[-- Type: application/octet-stream, Size: 1456 bytes --]
--- /home/fred/man-pages-3.17/man4/tty_ioctl.4 2009-01-19 05:14:02.000000000 +0100
+++ /home/fred/man-pages-3.17-new/man4/tty_ioctl.4 2009-02-09 10:20:43.363377700 +0100
@@ -349,18 +349,26 @@
.SS "Modem control"
.TP
.BI "TIOCMGET int *" argp
-get the status of modem bits.
+Get the status of modem bits.
.TP
.BI "TIOCMSET const int *" argp
-set the status of modem bits.
+Set the status of modem bits.
.TP
.BI "TIOCMBIC const int *" argp
-clear the indicated modem bits.
+Clear the indicated modem bits.
.TP
.BI "TIOCMBIS const int *" argp
-set the indicated modem bits.
+Set the indicated modem bits.
+.TP
+.BI "TIOCMIWAIT int " arg
+Wait for any of the 4 modem bits (DCD, RI, DSR, CTS) to change.
+The mask is passed in arg for bits of interest (use |'ed
+TIOCM_RNG/DSR/CD/CTS for masking).
+Caller should use
+.B TIOCGICOUNT
+to see which one it was.
.LP
-Bits used by these four ioctls:
+Bits used by these five ioctls:
.nf
TIOCM_LE DSR (data set ready/line enable)
@@ -375,6 +383,15 @@
TIOCM_RI see TIOCM_RNG
TIOCM_DSR DSR (data set ready)
.fi
+.TP
+.BI "TIOCGICOUNT struct serial_icounter_struct *" argp
+Get counter of input serial line interrupts (DCD, RI, DSR, CTS).
+Write counters to the user passed
+.I argp
+serial_icounter_struct structure.
+.br
+NB: both 1->0 and 0->1 transitions are counted except for
+RI where only 0->1 is counted.
.SS "Marking a line as local"
.TP
.BI "TIOCGSOFTCAR int *" argp
next reply other threads:[~2009-02-09 10:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-09 10:48 Frédéric Maria [this message]
[not found] ` <1234176480.499009e0c8303-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
2015-05-01 21:12 ` Patch on man4/tty_ioctl.4 regarding TIOCMIWAIT & TIOCGICOUNT Michael Kerrisk (man-pages)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1234176480.499009e0c8303@imp.free.fr \
--to=frederic.maria-ganu6spqydw@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).