⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c-iosys7.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title>    I/O System   </title></head><body bgcolor="FFFFFF"><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-iosys.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-iosys6.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-iosys8.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h3 class="H2"><i><a name="84371">3.7  &nbsp;&nbsp;Devices in VxWorks</a></i></h3></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84372"> </a>The VxWorks I/O system is flexible, allowing specific device drivers to handle the seven I/O functions. All VxWorks device drivers follow the basic conventions outlined previously, but differ in specifics; this section describes those specifics.<p class="table"><h4 class="EntityTitle"><a name="87812"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 3-6:&nbsp;&nbsp;Drivers Provided with VxWorks &nbsp;</font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="87816"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Module</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="87818"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Driver Description</font></b></div></th></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="87820"> </a><b class="file">ttyDrv</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="87822"> </a>Terminal driver &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="87825"> </a><b class="file">ptyDrv</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="87827"> </a>Pseudo-terminal driver&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="87830"> </a><b class="file">pipeDrv</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="87832"> </a>Pipe driver&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="87942"> </a><b class="file">memDrv</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="87944"> </a>Pseudo memory device driver&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="87840"> </a><b class="file">nfsDrv</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="87842"> </a>NFS client driver&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="87947"> </a><b class="file">netDrv</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="87949"> </a>Network driver for remote file access&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="87845"> </a><b class="file">ramDrv</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="87847"> </a>RAM driver for creating a RAM disk&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="87855"> </a><b class="file">scsiLib</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="87857"> </a>SCSI interface library &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="87859"> </a>- &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="87862"> </a>Other hardware-specific drivers&nbsp;</div></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="84441">3.7.1  &nbsp;&nbsp;Serial I/O Devices (Terminal and Pseudo-Terminal Devices)</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84442"> </a>VxWorks provides terminal and pseudo-terminal device drivers (<i class="acronym_lc">tty</i> and <i class="acronym_lc">pty</i> drivers). The <i class="acronym_lc">tty</i> driver is for actual terminals; the <i class="acronym_lc">pty</i> driver is for processes that simulate terminals. These pseudo terminals are useful in applications such as remote login facilities.<sup><a href="#foot"><b class="FootnoteMarker">1</b></a></sup></p><dd><p class="Body"><a name="84448"> </a>VxWorks serial I/O devices are buffered serial byte streams. Each device has a ring buffer (circular buffer) for both input and output. Reading from a <i class="acronym_lc">tty</i> device extracts bytes from the input ring. Writing to a <i class="acronym_lc">tty</i> device adds bytes to the output ring. The size of each ring buffer is specified when the device is created during system initialization.</p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84451">Tty Options</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84452"> </a>The <i class="acronym_lc">tty</i> devices have a full range of options that affect the behavior of the device. These options are selected by setting bits in the device option word using the <b class="routine"><i class="routine">ioctl</i></b><b>(</b>&nbsp;<b>)</b> routine with the <b class="symbol_UC">FIOSETOPTIONS</b> function (see <a href="c-iosys7.html#84640"><i class="title">I/O Control Functions</i></a>). For example, to set all the <i class="acronym_lc">tty </i>options except <b class="symbol_UC">OPT_MON_TRAP</b>:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84458"><i class="textVariable">status</i> = ioctl (<i class="textVariable">fd</i>, FIOSETOPTIONS, OPT_TERMINAL &amp; ~OPT_MON_TRAP);</a></b></pre></dl><dd><p class="Body"><a name="84462"> </a><a href="c-iosys7.html#84466">Table&nbsp;3-7</a> is a summary of the available options. The listed names are defined in the header file <b class="file">ioLib.h</b>. For more detailed information, see the reference entry for <b class="library">tyLib</b>.<p class="table"><h4 class="EntityTitle"><a name="84466"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 3-7:&nbsp;&nbsp;Tty Options</font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="84470"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Library</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="84472"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Description</font></b></div></th></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84475"> </a><b class="symbol_UC">OPT_LINE</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84481"> </a>Select <i class="term">line mode</i>. (See <a href="c-iosys7.html#84532"><i class="title">Raw Mode and Line Mode</i></a>.)&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84484"> </a><b class="symbol_UC">OPT_ECHO</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84486"> </a>Echo input characters to the output of the same channel.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84489"> </a><b class="symbol_UC">OPT_CRMOD</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84491"> </a>Translate input <kbd>RETURN</kbd> characters into <kbd>NEWLINE</kbd> (\n); translate output <kbd>NEWLINE </kbd>into <kbd>RETURN-LINEFEED</kbd>.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84494"> </a><b class="symbol_UC">OPT_TANDEM</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84499"> </a>Respond to X-on/X-off protocol (<kbd>CTRL+Q</kbd> and <kbd>CTRL+S</kbd>).&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="98003"> </a><b class="symbol_UC">OPT_7_BIT</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84504"> </a>Strip the most significant bit from all input bytes.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84507"> </a><b class="symbol_UC">OPT_MON_TRAP</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84510"> </a>Enable the special <i class="term">ROM monitor trap</i> character, <kbd>CTRL+X</kbd> by default. &nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84513"> </a><b class="symbol_UC">OPT_ABORT</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84516"> </a>Enable the special <i class="term">target shell abort</i> character, <kbd>CTRL+C</kbd> by default. (Only useful if the target shell is configured into the system; see <a href="c-tshell.html#84368"><i class="title">9.&nbsp;Target Shell</i></a> in this manual for details.)&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84522"> </a><b class="symbol_UC">OPT_TERMINAL</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84524"> </a>Set all of the above option bits.&nbsp;</div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="84527"> </a><b class="symbol_UC">OPT_RAW</b> &nbsp;</div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="84530"> </a>Set none of the above option bits.&nbsp;</div></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -