* Patch on man4/tty_ioctl.4 regarding TIOCMIWAIT & TIOCGICOUNT
@ 2009-02-09 10:48 Frédéric Maria
[not found] ` <1234176480.499009e0c8303-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Frédéric Maria @ 2009-02-09 10:48 UTC (permalink / raw)
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-man-u79uwXL29TY76Z2rM5mHXA
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch on man4/tty_ioctl.4 regarding TIOCMIWAIT & TIOCGICOUNT
[not found] ` <1234176480.499009e0c8303-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
@ 2015-05-01 21:12 ` Michael Kerrisk (man-pages)
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2015-05-01 21:12 UTC (permalink / raw)
To: Frédéric Maria
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w,
linux-man-u79uwXL29TY76Z2rM5mHXA, Stephane Fillod
Frédéric
On 02/09/2009 11:48 AM, Frédéric Maria wrote:
> 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.
Long after the fact, I've applied this patch. Thanks for sending it.
Cheers,
Michael
> --- /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
>
>
>
>
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-01 21:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09 10:48 Patch on man4/tty_ioctl.4 regarding TIOCMIWAIT & TIOCGICOUNT Frédéric Maria
[not found] ` <1234176480.499009e0c8303-HZaT1/I6gcdWj0EZb7rXcA@public.gmane.org>
2015-05-01 21:12 ` Michael Kerrisk (man-pages)
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).