mirror of https://github.com/mkerrisk/man-pages
Added .SS headers to give some structure to this page; and a small
amount of reordering.
This commit is contained in:
parent
4a837837ba
commit
87d1fd8703
|
@ -70,6 +70,7 @@ get and set terminal attributes, line control, get and set baud rate
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The termios functions describe a general terminal interface that is
|
The termios functions describe a general terminal interface that is
|
||||||
provided to control asynchronous communications ports.
|
provided to control asynchronous communications ports.
|
||||||
|
.SS "The termios structure"
|
||||||
.LP
|
.LP
|
||||||
Many of the functions described here have a \fItermios_p\fP argument
|
Many of the functions described here have a \fItermios_p\fP argument
|
||||||
that is a pointer to a \fItermios\fP structure. This structure contains
|
that is a pointer to a \fItermios\fP structure. This structure contains
|
||||||
|
@ -483,6 +484,7 @@ MIN characters have been received. If only TIME is set, the read will
|
||||||
return as soon as either at least one character has been received,
|
return as soon as either at least one character has been received,
|
||||||
or the timer times out. If neither is set, the read will return
|
or the timer times out. If neither is set, the read will return
|
||||||
immediately, only giving the currently already available characters.
|
immediately, only giving the currently already available characters.
|
||||||
|
.SS "Retrieving and changing terminal settings"
|
||||||
.PP
|
.PP
|
||||||
.BR tcgetattr ()
|
.BR tcgetattr ()
|
||||||
gets the parameters associated with the object referred by \fIfd\fP and
|
gets the parameters associated with the object referred by \fIfd\fP and
|
||||||
|
@ -508,6 +510,7 @@ the change occurs after all output written to the object referred by
|
||||||
.I fd
|
.I fd
|
||||||
has been transmitted, and all input that has been received but not read
|
has been transmitted, and all input that has been received but not read
|
||||||
will be discarded before the change is made.
|
will be discarded before the change is made.
|
||||||
|
.SS "Line control"
|
||||||
.LP
|
.LP
|
||||||
.BR tcsendbreak ()
|
.BR tcsendbreak ()
|
||||||
transmits a continuous stream of zero-valued bits for a specific
|
transmits a continuous stream of zero-valued bits for a specific
|
||||||
|
@ -558,17 +561,7 @@ transmitting data to the system.
|
||||||
The default on open of a terminal file is that neither its input nor its
|
The default on open of a terminal file is that neither its input nor its
|
||||||
output is suspended.
|
output is suspended.
|
||||||
.LP
|
.LP
|
||||||
The baud rate functions are provided for getting and setting the values
|
.SS "Raw mode"
|
||||||
of the input and output baud rates in the \fItermios\fP structure. The
|
|
||||||
new values do not take effect
|
|
||||||
until \fBtcsetattr\fP() is successfully called.
|
|
||||||
|
|
||||||
Setting the speed to \fBB0\fP instructs the modem to "hang up".
|
|
||||||
The actual bit rate corresponding to \fBB38400\fP may be altered with
|
|
||||||
\fBsetserial\fP(8).
|
|
||||||
.LP
|
|
||||||
The input and output baud rates are stored in the \fItermios\fP
|
|
||||||
structure.
|
|
||||||
.LP
|
.LP
|
||||||
\fBcfmakeraw\fP() sets the terminal attributes as follows:
|
\fBcfmakeraw\fP() sets the terminal attributes as follows:
|
||||||
.nf
|
.nf
|
||||||
|
@ -580,6 +573,18 @@ structure.
|
||||||
termios_p->c_cflag &= ~(CSIZE | PARENB);
|
termios_p->c_cflag &= ~(CSIZE | PARENB);
|
||||||
termios_p->c_cflag |= CS8;
|
termios_p->c_cflag |= CS8;
|
||||||
.fi
|
.fi
|
||||||
|
.SS "Line speed"
|
||||||
|
The baud rate functions are provided for getting and setting the values
|
||||||
|
of the input and output baud rates in the \fItermios\fP structure. The
|
||||||
|
new values do not take effect
|
||||||
|
until \fBtcsetattr\fP() is successfully called.
|
||||||
|
|
||||||
|
Setting the speed to \fBB0\fP instructs the modem to "hang up".
|
||||||
|
The actual bit rate corresponding to \fBB38400\fP may be altered with
|
||||||
|
\fBsetserial\fP(8).
|
||||||
|
.LP
|
||||||
|
The input and output baud rates are stored in the \fItermios\fP
|
||||||
|
structure.
|
||||||
.LP
|
.LP
|
||||||
.BR cfgetospeed ()
|
.BR cfgetospeed ()
|
||||||
returns the output baud rate stored in the \fItermios\fP structure
|
returns the output baud rate stored in the \fItermios\fP structure
|
||||||
|
|
Loading…
Reference in New Issue