📄 xbd_chap11.html
字号:
</td></tr><tr valign="top"><td align="left"><p class="tent">TAB1</p></td><td align="left"><p class="tent">Horizontal-tab delay type 1.</p></td></tr><tr valign="top"><td align="left"><p class="tent">TAB2</p></td><td align="left"><p class="tent">Horizontal-tab delay type 2.</p></td></tr><tr valign="top"><td align="left"><p class="tent">TAB3</p></td><td align="left"><p class="tent">Expand tabs to spaces.</p></td></tr><tr valign="top"><td align="left"><p class="tent">BSDLY</p></td><td align="left"><p class="tent">Select backspace delays:</p></td></tr><tr valign="top"><td align="left"><p class="tent">BS0</p></td><td align="left"><p class="tent">Backspace-delay type 0.</p></td></tr><tr valign="top"><td align="left"><p class="tent">BS1</p></td><td align="left"><p class="tent">Backspace-delay type 1.</p></td></tr><tr valign="top"><td align="left"><p class="tent">VTDLY</p></td><td align="left"><p class="tent">Select vertical-tab delays:</p></td></tr><tr valign="top"><td align="left"><p class="tent">VT0</p></td><td align="left"><p class="tent">Vertical-tab delay type 0.</p></td></tr><tr valign="top"><td align="left"><p class="tent">VT1</p></td><td align="left"><p class="tent">Vertical-tab delay type 1.</p></td></tr><tr valign="top"><td align="left"><p class="tent">FFDLY</p></td><td align="left"><p class="tent">Select form-feed delays:</p></td></tr><tr valign="top"><td align="left"><p class="tent">FF0</p></td><td align="left"><p class="tent">Form-feed delay type 0.</p></td></tr><tr valign="top"><td align="left"><p class="tent">FF1</p></td><td align="left"><p class="tent">Form-feed delay type 1. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p></td></tr></table></center><p>If OPOST is set, output data shall be post-processed as described below, so that lines of text are modified to appearappropriately on the terminal device; otherwise, characters shall be transmitted without change.</p><p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">If ONLCR is set, the NL character shall be transmitted as the CR-NL character pair. If OCRNL is set, the CR character shall betransmitted as the NL character. If ONOCR is set, no CR character shall be transmitted when at column 0 (first position). If ONLRETis set, the NL character is assumed to do the carriage-return function; the column pointer shall be set to 0 and the delaysspecified for CR shall be used. Otherwise, the NL character is assumed to do just the line-feed function; the column pointerremains unchanged. The column pointer shall also be set to 0 if the CR character is actually transmitted.</p><p>The delay bits specify how long transmission stops to allow for mechanical or other movement when certain characters are sent tothe terminal. In all cases a value of 0 shall indicate no delay. If OFILL is set, fill characters shall be transmitted for delayinstead of a timed delay. This is useful for high baud rate terminals which need only a minimal delay. If OFDEL is set, the fillcharacter shall be DEL; otherwise, NUL.</p><p>If a form-feed or vertical-tab delay is specified, it shall last for about 2 seconds.</p><p>Newline delay shall last about 0.10 seconds. If ONLRET is set, the carriage-return delays shall be used instead of the newlinedelays. If OFILL is set, two fill characters shall be transmitted.</p><p>Carriage-return delay type 1 shall be dependent on the current column position, type 2 shall be about 0.10 seconds, and type 3shall be about 0.15 seconds. If OFILL is set, delay type 1 shall transmit two fill characters, and type 2 four fill characters.</p><p>Horizontal-tab delay type 1 shall be dependent on the current column position. Type 2 shall be about 0.10 seconds. Type 3specifies that tabs shall be expanded into spaces. If OFILL is set, two fill characters shall be transmitted for any delay.</p><p>Backspace delay shall last about 0.05 seconds. If OFILL is set, one fill character shall be transmitted.</p><p>The actual delays depend on line speed and system load. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p><p>The initial output control value after <a href="../functions/open.html"><i>open</i>()</a> is implementation-defined.</p><h4><a name="tag_11_02_04"></a>Control Modes</h4><p>The <i>c_cflag</i> field describes the hardware control of the terminal, and is composed of the bitwise-inclusive OR of themasks shown, which shall be bitwise-distinct. The mask name symbols in this table are defined in <a href="termios.h.html"><i><termios.h></i></a> ; not all values specified are required to be supported by the underlyinghardware:</p><center><table border="1" cellpadding="3" align="center"><tr valign="top"><th align="center"><p class="tent"><b>Mask Name</b></p></th><th align="center"><p class="tent"><b>Description</b></p></th></tr><tr valign="top"><td align="left"><p class="tent">CLOCAL</p></td><td align="left"><p class="tent">Ignore modem status lines.</p></td></tr><tr valign="top"><td align="left"><p class="tent">CREAD</p></td><td align="left"><p class="tent">Enable receiver.</p></td></tr><tr valign="top"><td align="left"><p class="tent">CSIZE</p></td><td align="left"><p class="tent">Number of bits transmitted or received per byte:</p></td></tr><tr valign="top"><td align="left"><p class="tent"> CS5</p></td><td align="left"><p class="tent"> 5 bits</p></td></tr><tr valign="top"><td align="left"><p class="tent"> CS6</p></td><td align="left"><p class="tent"> 6 bits</p></td></tr><tr valign="top"><td align="left"><p class="tent"> CS7</p></td><td align="left"><p class="tent"> 7 bits</p></td></tr><tr valign="top"><td align="left"><p class="tent"> CS8</p></td><td align="left"><p class="tent"> 8 bits.</p></td></tr><tr valign="top"><td align="left"><p class="tent">CSTOPB</p></td><td align="left"><p class="tent">Send two stop bits, else one.</p></td></tr><tr valign="top"><td align="left"><p class="tent">HUPCL</p></td><td align="left"><p class="tent">Hang up on last close.</p></td></tr><tr valign="top"><td align="left"><p class="tent">PARENB</p></td><td align="left"><p class="tent">Parity enable.</p></td></tr><tr valign="top"><td align="left"><p class="tent">PARODD</p></td><td align="left"><p class="tent">Odd parity, else even.</p></td></tr></table></center><p>In addition, the input and output baud rates are stored in the <b>termios</b> structure. The symbols in the following table aredefined in <a href="termios.h.html"><i><termios.h></i></a> . Not all values specified are required to be supported by theunderlying hardware.</p><center><table border="1" cellpadding="3" align="center"><tr valign="top"><th align="center"><p class="tent"><b>Name</b></p></th><th align="center"><p class="tent"><b>Description</b></p></th><th align="left"><p class="tent">Name</p></th><th align="center"><p class="tent"><b>Description</b></p></th><th align="center"><p class="tent"><b> </b></p></th></tr><tr valign="top"><td align="left"><p class="tent">B0</p></td><td align="left"><p class="tent">Hang up</p></td><td align="left"><p class="tent">B600</p></td><td align="left"><p class="tent">600 baud</p></td></tr><tr valign="top"><td align="left"><p class="tent">B50</p></td><td align="left"><p class="tent">50 baud</p></td><td align="left"><p class="tent">B1200</p></td><td align="left"><p class="tent">1200 baud</p></td></tr><tr valign="top"><td align="left"><p class="tent">B75</p></td><td align="left"><p class="tent">75 baud</p></td><td align="left"><p class="tent">B1800</p></td><td align="left"><p class="tent">1800 baud</p></td></tr><tr valign="top"><td align="left"><p class="tent">B110</p></td><td align="left"><p class="tent">110 baud</p></td><td align="left"><p class="tent">B2400</p></td><td align="left"><p class="tent">2400 baud</p></td></tr><tr valign="top"><td align="left"><p class="tent">B134</p></td><td align="left"><p class="tent">134.5 baud</p></td><td align="left"><p class="tent">B4800</p></td><td align="left"><p class="tent">4800 baud</p></td></tr><tr valign="top"><td align="left"><p class="tent">B150</p></td><td align="left"><p class="tent">150 baud</p></td><td align="left"><p class="tent">B9600</p></td><td align="left"><p class="tent">9600 baud</p></td></tr><tr valign="top"><td align="left"><p class="tent">B200</p></td><td align="left"><p class="tent">200 baud</p></td><td align="left"><p class="tent">B19200</p></td><td align="left"><p class="tent">19200 baud</p></td></tr><tr valign="top"><td align="left"><p class="tent">B300</p></td><td align="left">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -