📄 48.html
字号:
<a name='L198'><font color='darkred'>#define</font> B9600 0000015 <i><font color='green'>// 波特率 9600。</font></i>
<a name='L199'><font color='darkred'>#define</font> <a href='../S/48.html#L201' title='Refered from 201 in include/termios.h.'>B19200</a> 0000016 <i><font color='green'>// 波特率 19200。</font></i>
<a name='L200'><font color='darkred'>#define</font> <a href='../S/48.html#L202' title='Refered from 202 in include/termios.h.'>B38400</a> 0000017 <i><font color='green'>// 波特率 38400。</font></i>
<a name='L201'><font color='darkred'>#define</font> EXTA <a href='../S/48.html#L199' title='Defined at 199 in include/termios.h.'>B19200</a> <i><font color='green'>// 扩展波特率A。</font></i>
<a name='L202'><font color='darkred'>#define</font> EXTB <a href='../S/48.html#L200' title='Defined at 200 in include/termios.h.'>B38400</a> <i><font color='green'>// 扩展波特率B。</font></i>
<a name='L203'><font color='darkred'>#define</font> CSIZE 0000060 <i><font color='green'>// 字符位宽度屏蔽码。</font></i>
<a name='L204'><font color='darkred'>#define</font> CS5 0000000 <i><font color='green'>// 每字符5 比特位。</font></i>
<a name='L205'><font color='darkred'>#define</font> CS6 0000020 <i><font color='green'>// 每字符6 比特位。</font></i>
<a name='L206'><font color='darkred'>#define</font> CS7 0000040 <i><font color='green'>// 每字符7 比特位。</font></i>
<a name='L207'><font color='darkred'>#define</font> <a href='../R/18.html' title='Multiple refered from 2 places.'>CS8</a> 0000060 <i><font color='green'>// 每字符8 比特位。</font></i>
<a name='L208'><font color='darkred'>#define</font> CSTOPB 0000100 <i><font color='green'>// 设置两个停止位,而不是1 个。</font></i>
<a name='L209'><font color='darkred'>#define</font> CREAD 0000200 <i><font color='green'>// 允许接收。</font></i>
<a name='L210'><font color='darkred'>#define</font> <a href='../S/48.html#L217' title='Refered from 217 in include/termios.h.'>CPARENB</a> 0000400 <i><font color='green'>// 开启输出时产生奇偶位、输入时进行奇偶校验。</font></i>
<a name='L211'><font color='darkred'>#define</font> <a href='../S/48.html#L218' title='Refered from 218 in include/termios.h.'>CPARODD</a> 0001000 <i><font color='green'>// 输入/输入校验是奇校验。</font></i>
<a name='L212'><font color='darkred'>#define</font> HUPCL 0002000 <i><font color='green'>// 最后进程关闭后挂断。</font></i>
<a name='L213'><font color='darkred'>#define</font> CLOCAL 0004000 <i><font color='green'>// 忽略调制解调器(modem)控制线路。</font></i>
<a name='L214'><font color='darkred'>#define</font> CIBAUD 03600000 <i><font color='green'>/* input baud rate (not used) */</font></i> <i><font color='green'>/* 输入波特率(未使用) */</font></i>
<a name='L215'><font color='darkred'>#define</font> CRTSCTS 020000000000 <i><font color='green'>/* flow control */</font></i> <i><font color='green'>/* 流控制 */</font></i>
<a name='L216'>
<a name='L217'><font color='darkred'>#define</font> PARENB <a href='../S/48.html#L210' title='Defined at 210 in include/termios.h.'>CPARENB</a> <i><font color='green'>// 开启输出时产生奇偶位、输入时进行奇偶校验。</font></i>
<a name='L218'><font color='darkred'>#define</font> PARODD <a href='../S/48.html#L211' title='Defined at 211 in include/termios.h.'>CPARODD</a> <i><font color='green'>// 输入/输入校验是奇校验。</font></i>
<a name='L219'>
<a name='L220'><i><font color='green'>/* c_lflag bits */</font></i><i><font color='green'>/* c_lflag 比特位 */</font></i>
<a name='L221'><i><font color='green'>// termios 结构中本地模式标志字段c_lflag 的符号常数。</font></i>
<a name='L222'><font color='darkred'>#define</font> <a href='../R/100.html' title='Multiple refered from 2 places.'>ISIG</a> 0000001 <i><font color='green'>// 当收到字符INTR、QUIT、SUSP 或DSUSP,产生相应的信号。</font></i>
<a name='L223'><font color='darkred'>#define</font> <a href='../R/88.html' title='Multiple refered from 2 places.'>ICANON</a> 0000002 <i><font color='green'>// 开启规范模式(熟模式)。</font></i>
<a name='L224'><font color='darkred'>#define</font> XCASE 0000004 <i><font color='green'>// 若设置了ICANON,则终端是大写字符的。</font></i>
<a name='L225'><font color='darkred'>#define</font> <a href='../R/38.html' title='Multiple refered from 2 places.'>ECHO</a> 0000010 <i><font color='green'>// 回显输入字符。</font></i>
<a name='L226'><font color='darkred'>#define</font> <a href='../S/65.html#L44' title='Refered from 44 in kernel/chr_drv/tty_io.c.'>ECHOE</a> 0000020 <i><font color='green'>// 若设置了ICANON,则ERASE/WERASE 将擦除前一字符/单词。</font></i>
<a name='L227'><font color='darkred'>#define</font> <a href='../S/65.html#L45' title='Refered from 45 in kernel/chr_drv/tty_io.c.'>ECHOK</a> 0000040 <i><font color='green'>// 若设置了ICANON,则KILL 字符将擦除当前行。</font></i>
<a name='L228'><font color='darkred'>#define</font> ECHONL 0000100 <i><font color='green'>// 如设置了ICANON,则即使ECHO 没有开启也回显NL 字符。</font></i>
<a name='L229'><font color='darkred'>#define</font> NOFLSH 0000200 <i><font color='green'>// 当生成SIGINT 和SIGQUIT 信号时不刷新输入输出队列,当</font></i>
<a name='L230'><i><font color='green'>// 生成SIGSUSP 信号时,刷新输入队列。</font></i>
<a name='L231'><font color='darkred'>#define</font> TOSTOP 0000400 <i><font color='green'>// 发送SIGTTOU 信号到后台进程的进程组,该后台进程试图写</font></i>
<a name='L232'><i><font color='green'>// 自己的控制终端。</font></i>
<a name='L233'><font color='darkred'>#define</font> <a href='../R/39.html' title='Multiple refered from 2 places.'>ECHOCTL</a> 0001000 <i><font color='green'>// 若设置了ECHO,则除TAB、NL、START 和STOP 以外的ASCII</font></i>
<a name='L234'><i><font color='green'>// 控制信号将被回显成象^X 式样,X 值是控制符+0x40。</font></i>
<a name='L235'><font color='darkred'>#define</font> ECHOPRT 0002000 <i><font color='green'>// 若设置了ICANON 和IECHO,则字符在擦除时将显示。</font></i>
<a name='L236'><font color='darkred'>#define</font> <a href='../R/42.html' title='Multiple refered from 2 places.'>ECHOKE</a> 0004000 <i><font color='green'>// 若设置了ICANON,则KILL 通过擦除行上的所有字符被回显。</font></i>
<a name='L237'><font color='darkred'>#define</font> FLUSHO 0010000 <i><font color='green'>// 输出被刷新。通过键入DISCARD 字符,该标志被翻转。</font></i>
<a name='L238'><font color='darkred'>#define</font> PENDIN 0040000 <i><font color='green'>// 当下一个字符是读时,输入队列中的所有字符将被重显。</font></i>
<a name='L239'><font color='darkred'>#define</font> IEXTEN 0100000 <i><font color='green'>// 开启实现时定义的输入处理。</font></i>
<a name='L240'>
<a name='L241'><i><font color='green'>/* modem lines */</font></i><i><font color='green'>/* modem 线路信号符号常数 */</font></i>
<a name='L242'><font color='darkred'>#define</font> TIOCM_LE 0x001 <i><font color='green'>// 线路允许(Line Enable)。</font></i>
<a name='L243'><font color='darkred'>#define</font> TIOCM_DTR 0x002 <i><font color='green'>// 数据终端就绪(Data Terminal Ready)。</font></i>
<a name='L244'><font color='darkred'>#define</font> TIOCM_RTS 0x004 <i><font color='green'>// 请求发送(Request to Send)。</font></i>
<a name='L245'><font color='darkred'>#define</font> TIOCM_ST 0x008 <i><font color='green'>// 串行数据发送(Serial Transfer)。[??]</font></i>
<a name='L246'><font color='darkred'>#define</font> TIOCM_SR 0x010 <i><font color='green'>// 串行数据接收(Serial Receive)。[??]</font></i>
<a name='L247'><font color='darkred'>#define</font> TIOCM_CTS 0x020 <i><font color='green'>// 清除发送(Clear To Send)。</font></i>
<a name='L248'><font color='darkred'>#define</font> <a href='../S/48.html#L251' title='Refered from 251 in include/termios.h.'>TIOCM_CAR</a> 0x040 <i><font color='green'>// 载波监测(Carrier Detect)。</font></i>
<a name='L249'><font color='darkred'>#define</font> <a href='../S/48.html#L252' title='Refered from 252 in include/termios.h.'>TIOCM_RNG</a> 0x080 <i><font color='green'>// 响铃指示(Ring indicate)。</font></i>
<a name='L250'><font color='darkred'>#define</font> TIOCM_DSR 0x100 <i><font color='green'>// 数据设备就绪(Data Set Ready)。</font></i>
<a name='L251'><font color='darkred'>#define</font> TIOCM_CD <a href='../S/48.html#L248' title='Defined at 248 in include/termios.h.'>TIOCM_CAR</a>
<a name='L252'><font color='darkred'>#define</font> TIOCM_RI <a href='../S/48.html#L249' title='Defined at 249 in include/termios.h.'>TIOCM_RNG</a>
<a name='L253'>
<a name='L254'><i><font color='green'>/* tcflow() and TCXONC use these */</font></i><i><font color='green'>/* tcflow()和TCXONC 使用这些符号常数 */</font></i>
<a name='L255'><font color='darkred'>#define</font> TCOOFF 0 <i><font color='green'>// 挂起输出。</font></i>
<a name='L256'><font color='darkred'>#define</font> TCOON 1 <i><font color='green'>// 重启被挂起的输出。</font></i>
<a name='L257'><font color='darkred'>#define</font> TCIOFF 2 <i><font color='green'>// 系统传输一个STOP 字符,使设备停止向系统传输数据。</font></i>
<a name='L258'><font color='darkred'>#define</font> TCION 3 <i><font color='green'>// 系统传输一个START 字符,使设备开始向系统传输数据。</font></i>
<a name='L259'>
<a name='L260'><i><font color='green'>/* tcflush() and TCFLSH use these */</font></i><i><font color='green'>/* tcflush()和TCFLSH 使用这些符号常数 */</font></i>
<a name='L261'><font color='darkred'>#define</font> TCIFLUSH 0 <i><font color='green'>// 清接收到的数据但不读。</font></i>
<a name='L262'><font color='darkred'>#define</font> TCOFLUSH 1 <i><font color='green'>// 清已写的数据但不传送。</font></i>
<a name='L263'><font color='darkred'>#define</font> TCIOFLUSH 2 <i><font color='green'>// 清接收到的数据但不读。清已写的数据但不传送。</font></i>
<a name='L264'>
<a name='L265'><i><font color='green'>/* tcsetattr uses these */</font></i><i><font color='green'>/* tcsetattr()使用这些符号常数 */</font></i>
<a name='L266'><font color='darkred'>#define</font> TCSANOW 0 <i><font color='green'>// 改变立即发生。</font></i>
<a name='L267'><font color='darkred'>#define</font> TCSADRAIN 1 <i><font color='green'>// 改变在所有已写的输出被传输之后发生。</font></i>
<a name='L268'><font color='darkred'>#define</font> TCSAFLUSH 2 <i><font color='green'>// 改变在所有已写的输出被传输之后并且在所有接收到但</font></i>
<a name='L269'><i><font color='green'>// 还没有读取的数据被丢弃之后发生。</font></i>
<a name='L270'>
<a name='L271'><b>typedef</b> <b>int</b> <a href='../R/616.html' title='Multiple refered from 4 places.'>speed_t</a>; <i><font color='green'>// 波特率数值类型。</font></i>
<a name='L272'>
<a name='L273'><i><font color='green'>// 返回termios_p 所指termios 结构中的接收波特率。</font></i>
<a name='L274'><b>extern</b> <a href='../S/48.html#L271' title='Defined at 271 in include/termios.h.'>speed_t</a> cfgetispeed (<b>struct</b> termios *termios_p);
<a name='L275'><i><font color='green'>// 返回termios_p 所指termios 结构中的发送波特率。</font></i>
<a name='L276'><b>extern</b> <a href='../S/48.html#L271' title='Defined at 271 in include/termios.h.'>speed_t</a> cfgetospeed (<b>struct</b> termios *termios_p);
<a name='L277'><i><font color='green'>// 将termios_p 所指termios 结构中的接收波特率设置为speed。</font></i>
<a name='L278'><b>extern</b> <b>int</b> cfsetispeed (<b>struct</b> termios *termios_p, <a href='../S/48.html#L271' title='Defined at 271 in include/termios.h.'>speed_t</a> speed);
<a name='L279'><i><font color='green'>// 将termios_p 所指termios 结构中的发送波特率设置为speed。</font></i>
<a name='L280'><b>extern</b> <b>int</b> cfsetospeed (<b>struct</b> termios *termios_p, <a href='../S/48.html#L271' title='Defined at 271 in include/termios.h.'>speed_t</a> speed);
<a name='L281'><i><font color='green'>// 等待fildes 所指对象已写输出数据被传送出去。</font></i>
<a name='L282'><b>extern</b> <b>int</b> tcdrain (<b>int</b> fildes);
<a name='L283'><i><font color='green'>// 挂起/重启fildes 所指对象数据的接收和发送。</font></i>
<a name='L284'><b>extern</b> <b>int</b> tcflow (<b>int</b> fildes, <b>int</b> action);
<a name='L285'><i><font color='green'>// 丢弃fildes 指定对象所有已写但还没传送以及所有已收到但还没有读取的数据。</font></i>
<a name='L286'><b>extern</b> <b>int</b> tcflush (<b>int</b> fildes, <b>int</b> queue_selector);
<a name='L287'><i><font color='green'>// 获取与句柄fildes 对应对象的参数,并将其保存在termios_p 所指的地方。</font></i>
<a name='L288'><b>extern</b> <b>int</b> tcgetattr (<b>int</b> fildes, <b>struct</b> termios *termios_p);
<a name='L289'><i><font color='green'>// 如果终端使用异步串行数据传输,则在一定时间内连续传输一系列0 值比特位。</font></i>
<a name='L290'><b>extern</b> <b>int</b> tcsendbreak (<b>int</b> fildes, <b>int</b> duration);
<a name='L291'><i><font color='green'>// 使用termios 结构指针termios_p 所指的数据,设置与终端相关的参数。</font></i>
<a name='L292'><b>extern</b> <b>int</b> tcsetattr (<b>int</b> fildes, <b>int</b> optional_actions,
<a name='L293'> <b>struct</b> termios *termios_p);
<a name='L294'>
<a name='L295'><font color='darkred'>#endif</font>
</pre>
<hr>
<a name='BOTTOM'>
<i><font color='green'>/* [<][>][^][v]<a href='#TOP'>[top]</a>[bottom]<a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</font></i>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -