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

📄 lptdrv.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/lptDrv.html - generated by refgen from lptDrv.c --> <title> lptDrv </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual :  Libraries</i></a></p></blockquote><h1>lptDrv</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>lptDrv</strong> - parallel chip device driver for the IBM-PC LPT </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./lptDrv.html#lptDrv">lptDrv</a></i>(&nbsp;)</b>  -  initialize the LPT driver<br><b><i><a href="./lptDrv.html#lptDevCreate">lptDevCreate</a></i>(&nbsp;)</b>  -  create a device for an LPT port<br><b><i><a href="./lptDrv.html#lptShow">lptShow</a></i>(&nbsp;)</b>  -  show LPT statistics<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This is the driver for the LPT used on the IBM-PC.If <b>INCLUDE_LPT</b> is defined, the driver initializes the LPT on the PC.<p></blockquote><h4>USER-CALLABLE ROUTINES</h4><blockquote><p>Most of the routines in this driver are accessible only through the I/Osystem.  However, two routines must be called directly:  <b><i><a href="./lptDrv.html#lptDrv">lptDrv</a></i>(&nbsp;)</b> toinitialize the driver, and <b><i><a href="./lptDrv.html#lptDevCreate">lptDevCreate</a></i>(&nbsp;)</b> to create devices.<p>There are one other callable routines:  <b><i><a href="./lptDrv.html#lptShow">lptShow</a></i>(&nbsp;)</b> to show statistics.The argument to <b><i><a href="./lptDrv.html#lptShow">lptShow</a></i>(&nbsp;)</b> is a channel number, 0 to 2.<p>Before the driver can be used, it must be initialized by calling <b><i><a href="./lptDrv.html#lptDrv">lptDrv</a></i>(&nbsp;)</b>.This routine should be called exactly once, before any reads, writes, orcalls to <b><i><a href="./lptDrv.html#lptDevCreate">lptDevCreate</a></i>(&nbsp;)</b>.  Normally, it is called from <b><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>(&nbsp;)</b> in<b>usrConfig.c</b>.  The first argument to <b><i><a href="./lptDrv.html#lptDrv">lptDrv</a></i>(&nbsp;)</b> is a number of channels,0 to 2.  The second argument is a pointer to the resource table.Definitions of members of the resource table structure are:<p><pre>    int  ioBase;         /* IO base address */    int  intVector;      /* interrupt vector */    int  intLevel;       /* interrupt level */    BOOL autofeed;       /* TRUE if enable autofeed */    int  busyWait;       /* loop count for BUSY wait */    int  strobeWait;     /* loop count for STROBE wait */    int  retryCnt;       /* retry count */    int  timeout;        /* timeout second for syncSem */</pre></blockquote><h4>IOCTL FUNCTIONS</h4><blockquote><p>This driver responds to two functions: <b>LPT_SETCONTROL</b> and <b>LPT_GETSTATUS</b>.The argument for <b>LPT_SETCONTROL</b> is a value of the control register.The argument for <b>LPT_GETSTATUS</b> is a integer pointer where a value of thestatus register is stored.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lptDrv.html#top">lptDrv</a></b>, <i>VxWorks Programmer's Guide: I/O System</i><hr><a name="lptDrv"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>lptDrv</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>lptDrv</i>(&nbsp;)</strong> - initialize the LPT driver</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS lptDrv    (    int            channels, /* LPT channels */    LPT_RESOURCE * pResource /* LPT resources */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the LPT driver, sets up interrupt vectors,and performs hardware initialization of the LPT ports.<p>This routine should be called exactly once, before any reads, writes,or calls to <b><i><a href="./lptDrv.html#lptDevCreate">lptDevCreate</a></i>(&nbsp;)</b>.  Normally, it is called by <b><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>(&nbsp;)</b>in <b>usrConfig.c</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the driver cannot be installed.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lptDrv.html#top">lptDrv</a></b>, <b><i><a href="./lptDrv.html#lptDevCreate">lptDevCreate</a></i>(&nbsp;)</b><hr><a name="lptDevCreate"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>lptDevCreate</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>lptDevCreate</i>(&nbsp;)</strong> - create a device for an LPT port</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS lptDevCreate    (    char * name,   /* name to use for this device */    int    channel /* physical channel for this device (0 - 2) */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates a device for a specified LPT port.  Each portto be used should have exactly one device associated with it by callingthis routine.<p>For instance, to create the device <b>/lpt/0</b>, the proper call would be:<pre>    lptDevCreate ("/lpt/0", 0);</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the driver is not installed, the channel isinvalid, or the device already exists.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><i><a href="./lptDrv.html#lptDrv">lptDrv</a></i>(&nbsp;)</b><hr><a name="lptShow"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>lptShow</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>lptShow</i>(&nbsp;)</strong> - show LPT statistics</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void lptShow    (    UINT channel /* channel (0 - 2) */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine shows statistics for a specified LPT port.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./lptDrv.html#top">lptDrv</a></b></body></html>

⌨️ 快捷键说明

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