Re: Patch on man4/tty_ioctl.4 regarding TIOCMIWAIT & TIOCGICOUNT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux