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

📄 ne2000end.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/ne2000End.html - generated by refgen from ne2000End.c --> <title> ne2000End </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>ne2000End</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>ne2000End</strong> - NE2000 END network interface driver </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./ne2000End.html#ne2000EndLoad">ne2000EndLoad</a></i>(&nbsp;)</b>  -  initialize the driver and device<br><b><i><a href="./ne2000End.html#ne2000Parse">ne2000Parse</a></i>(&nbsp;)</b>  -  parse the init string<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p><p>This module implements the NE2000 Ethernet network interface driver.<p></blockquote><h4>EXTERNAL INTERFACE</h4><blockquote><p>The only external interface is the <b><i><a href="./ne2000End.html#ne2000EndLoad">ne2000EndLoad</a></i>(&nbsp;)</b> routine, which expectsthe <i>initString</i> parameter as input.  This parameter passes in a colon-delimited string of the format:<p><i>unit</i>:<i>adrs</i>:<i>vecNum</i>:<i>intLvl</i>:<i>byteAccess</i>:<i>usePromEnetAddr</i>:<i>offset</i><p>The <b><i><a href="./ne2000End.html#ne2000EndLoad">ne2000EndLoad</a></i>(&nbsp;)</b> function uses <b><i><a href="./ansiString.html#strtok">strtok</a></i>(&nbsp;)</b> to parse the string.<p></blockquote><h4>TARGET-SPECIFIC PARAMETERS</h4><blockquote><p><dl><dt><i>unit</i><dd>A convenient holdover from the former model.  This parameter is used onlyin the string name for the driver.<p><dt><i>adrs</i><dd>Tells the driver where to find the ne2000.<p><dt><i>vecNum</i><dd>Configures the ne2000 device to generate hardware interruptsfor various events within the device. Thus, it containsan interrupt handler routine.  The driver calls <b><i>sysIntConnect</i>(&nbsp;)</b> to connectits interrupt handler to the interrupt vector generated as a result ofthe ne2000 interrupt.<p><dt><i>intLvl</i><dd>This parameter is passed to an external support routine, <b><i><a href="../bsp/brutus/sysLib.html#sysLanIntEnable" >sysLanIntEnable</a></i>(&nbsp;)</b>,which is described below in "External Support Requirements." This routine is called during as part of driver's initialization.  It handles any board-specific operations required to allow the servicing of a ne2000interrupt on targets that use additional interrupt controller devices to help organize and service the various interrupt sources.  This parameter makes it possible for this driver to avoid all board-specific knowledge of such devices.  <p><dt><i>byteAccess</i><dd>Tells the driver the NE2000 is jumpered to operate in 8-bit mode.Requires that <b><i>SYS_IN_WORD_STRING</i>(&nbsp;)</b> and <b><i>SYS_OUT_WORD_STRING</i>(&nbsp;)</b> bewritten to properly access the device in this mode.<p><dt><i>usePromEnetAddr</i><dd>Attempt to get the ethernet address for the device from the on-chip(board) PROM attached to the NE2000.  Will fall back to using theBSP-supplied ethernet address if this parameter is 0 or if unable toread the ethernet address.<p><dt><i>offset</i><dd>Specifies the memory alignment offset.<p></dl></blockquote><h4>EXTERNAL SUPPORT REQUIREMENTS</h4><blockquote><p><p>This driver requires several external support functions, defined as macros:<pre>    SYS_INT_CONNECT(pDrvCtrl, routine, arg)    SYS_INT_DISCONNECT (pDrvCtrl, routine, arg)    SYS_INT_ENABLE(pDrvCtrl)    SYS_IN_CHAR(pDrvCtrl, reg, pData)    SYS_OUT_CHAR(pDrvCtrl, reg, pData)    SYS_IN_WORD_STRING(pDrvCtrl, reg, pData)    SYS_OUT_WORD_STRING(pDrvCtrl, reg, pData)</pre>These macros allow the driver to be customized for BSPs that usespecial versions of these routines.<p>The macro <b>SYS_INT_CONNECT</b> is used to connect the interrupt handler tothe appropriate vector.  By default it is the routine <b><i><a href="./intArchLib.html#intConnect">intConnect</a></i>(&nbsp;)</b>.<p>The macro <b>SYS_INT_DISCONNECT</b> is used to disconnect the interrupt handler priorto unloading the module.  By default this is a dummy routine thatreturns OK.<p>The macro <b>SYS_INT_ENABLE</b> is used to enable the interrupt level for theend device.  It is called once during initialization.  By default this isthe routine <b><i><a href="../bsp/brutus/sysLib.html#sysLanIntEnable" >sysLanIntEnable</a></i>(&nbsp;)</b>, defined in the module <b>sysLib.o</b>.<p>The macro <b>SYS_ENET_ADDR_GET</b> is used to get the ethernet address (MAC)for the device.  The single argument to this routine is the <b>END_DEVICE</b>pointer.  By default this routine copies the ethernet address stored inthe global variable ne2000EndEnetAddr into the <b>END_DEVICE</b> structure.<p>The macros <b>SYS_IN_CHAR</b>, <b>SYS_OUT_CHAR</b>, <b>SYS_IN_WORD_STRING</b> and<b>SYS_OUT_WORD_STRING</b> are used for accessing the ne2000 device.  Thedefault macros map these operations onto <b><i><a href="../bsp/evb403/sysLib.html#sysInByte" >sysInByte</a></i>(&nbsp;)</b>, <b><i><a href="../bsp/evb403/sysLib.html#sysOutByte" >sysOutByte</a></i>(&nbsp;)</b>,<b><i><a href="../bsp/mbx860/sysLib.html#sysInWordString" >sysInWordString</a></i>(&nbsp;)</b> and <b><i><a href="../bsp/mbx860/sysLib.html#sysOutWordString" >sysOutWordString</a></i>(&nbsp;)</b>.<p></blockquote><h4>INCLUDES</h4><blockquote><p><p><b>end.h</b> <b>endLib.h</b> <b>etherMultiLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ne2000End.html#top">ne2000End</a></b>, <b><a href="./muxLib.html#top">muxLib</a></b>, <b><a href="./endLib.html#top">endLib</a></b><i>Writing and Enhanced Network Driver </i><hr><a name="ne2000EndLoad"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ne2000EndLoad</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ne2000EndLoad</i>(&nbsp;)</strong> - initialize the driver and device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>END_OBJ* ne2000EndLoad    (    char* initString, /* String to be parsed by the driver. */    void* pBSP        /* for BSP group */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the driver and the device to the operational state.All of the device specific parameters are passed in the initString.<p>The string contains the target specific parameters like this:<p>"unit:register addr:int vector:int level:shmem addr:shmem size:shmem width"<p></blockquote><h4>RETURNS</h4><blockquote><p>An END object pointer or NULL on error.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ne2000End.html#top">ne2000End</a></b><hr><a name="ne2000Parse"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>ne2000Parse</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>ne2000Parse</i>(&nbsp;)</strong> - parse the init string</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ne2000Parse    (    NE2000END_DEVICE * pDrvCtrl,    char *             initString    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>Parse the input string.  Fill in values in the driver control structure.<p>The initialization string format is:<pre>  "unit:adrs:vecnum:intLvl:byteAccess:usePromEnetAddr:offset"</pre><dl><dt><i>unit</i><dd>Device unit number, a small integer.<p><dt><i>adrs</i><dd>Base address<p><dt><i>vecNum</i><dd>Interrupt vector number (used with sysIntConnect)<p><dt><i>intLvl</i><dd>Interrupt level (used with sysLanIntEnable)<p><dt><i>byteAccess</i><dd>Use 8-bit access mode.<p><dt><i>usePromEnetAddr</i><dd>get ethernet address from PROM.<p><dt><i>offset</i><dd> offset for memory alignment </dl><p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR for invalid arguments.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ne2000End.html#top">ne2000End</a></b></body></html>

⌨️ 快捷键说明

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