📄 elt3c509end.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/elt3c509End.html - generated by refgen from elt3c509End.c --> <title> elt3c509End </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>elt3c509End</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>elt3c509End</strong> - END network interface driver for 3COM 3C509</p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./elt3c509End.html#elt3c509Load">elt3c509Load</a></i>( )</b> - initialize the driver and device<br><b><i><a href="./elt3c509End.html#elt3c509Parse">elt3c509Parse</a></i>( )</b> - parse the init string<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This module implements the 3COM 3C509 EtherLink III Ethernet network interface driver.This driver is designed to be moderately generic. Thus, it operates unmodified across the range of architectures and targets supported by VxWorks. To achieve this, the driver load routine requires an input string consisting of several target-specific values. The driver also requires some external support routines. These target-specific values and the external support routines are described below. <p></blockquote><h4>BOARD LAYOUT</h4><blockquote><p>This device is on-board. No jumpering diagram is necessary.<p></blockquote><h4>EXTERNAL INTERFACE</h4><blockquote><p>The only external interface is the <b><i><a href="./elt3c509End.html#elt3c509Load">elt3c509Load</a></i>( )</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>port</i>:<i>intVector</i>:<i>intLevel</i>:<i>attachementType</i>:<i>nRxFrames</i><p>The <b><i><a href="./elt3c509End.html#elt3c509Load">elt3c509Load</a></i>( )</b> function uses <b><i><a href="./ansiString.html#strtok">strtok</a></i>( )</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>intVector</i><dd>Configures the ELT device to generate hardware interruptsfor various events within the device. Thus, it containsan interrupt handler routine. The driver calls <b><i><a href="./intArchLib.html#intConnect">intConnect</a></i>( )</b> to connectits interrupt handler to the interrupt vector generated as a result ofthe ELT interrupt.<p><dt><i>intLevel</i><dd>This parameter is passed to an external support routine, <b><i>sysEltIntEnable</i>( )</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 ELT interrupt 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>attachmentType</i><dd>This parameter is used to select the transceiver hardware attachment. This is then used by the <b><i>elt3c509BoardInit</i>( )</b> routine to activate the selected attachment. <b><i>elt3c509BoardInit</i>( )</b> is called as a part of the driver'sinitialization.<p><dt><i>nRxFrames</i><dd>This parameter is used as number of receive frames by the driver.<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_INT_DISABLE(pDrvCtrl) SYS_OUT_BYTE(pDrvCtrl, reg, data) SYS_IN_BYTE(pDrvCtrl, reg, data) SYS_OUT_WORD(pDrvCtrl, reg, data) SYS_IN_WORD(pDrvCtrl, reg, data) SYS_OUT_WORD_STRING(pDrvCtrl, reg, pData, len) SYS_IN_WORD_STRING(pDrvCtrl, reg, pData, len) sysEltIntEnable(pDrvCtrl->intLevel) sysEltIntDisable(pDrvCtrl->intLevel) </pre>There are default values in the source code for these macros. They presumeIO-mapped accesses to the device registers and the normal <b><i><a href="./intArchLib.html#intConnect">intConnect</a></i>( )</b>,and <b><i><a href="./intArchLib.html#intEnable">intEnable</a></i>( )</b> BSP functions. The first argument to each is the devicecontroller structure. Thus, each has access back to all the device-specificinformation. Having the pointer in the macro facilitates the addition of new features to this driver.<p>The macros <b>SYS_INT_CONNECT</b>, <b>SYS_INT_DISCONNECT</b>, and <b>SYS_INT_ENABLE</b> allowthe driver to be customized for BSPs that use special versions of theseroutines.<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>( )</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. It calls anexternal board level routine <b><i>sysEltIntEnable</i>( )</b>. <p>The macro <b>SYS_INT_DISABLE</b> is used to disable the interrupt level for theend device. It is called during stop. It calls anexternal board level routine <b><i>sysEltIntDisable</i>( )</b>. <p></blockquote><h4>SYSTEM RESOURCE USAGE</h4><blockquote><p>When implemented, this driver requires the following system resources:<p> - one interrupt vector<br> - 9720 bytes of text<br> - 88 bytes in the initialized data section (data)<br> - 0 bytes of bss<p>The driver requires 1520 bytes of preallocation for Transmit Buffer and 1520*nRxFrames of receive buffers. The default value of nRxFrames is 64therefore total pre-allocation is (64 + 1)*1520.<p></blockquote><h4>TUNING HINTS</h4><blockquote><p>nRxFrames parameter can be used for tuning no of receive frames to be usedfor handling packet receive. More no. of these could help receiving more loaning in case of massive reception.<p></blockquote><h4>INCLUDES</h4><blockquote><p><p><b>end.h</b> <b>endLib.h</b> <b>etherMultiLib.h</b> <b>elt3c509End.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./elt3c509End.html#top">elt3c509End</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="elt3c509Load"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>elt3c509Load</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>elt3c509Load</i>( )</strong> - initialize the driver and device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>END_OBJ * elt3c509Load ( char * initString /* String to be parsed by the driver. */ )</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 <i>initString</i>, whichexpects a string of the following format:<p><i>unit</i>:<i>port</i>:<i>intVector</i>:<i>intLevel</i>:<i>attachementType</i>:<i>noRxFrames</i><p>This routine can be called in two modes. If it is called with an empty butallocated string, it places the name of this device (that is, "elt") into the <i>initString</i> and returns 0.<p>If the string is allocated and not empty, the routine attempts to loadthe driver using the values specified in the string.<p></blockquote><h4>RETURNS</h4><blockquote><p>An END object pointer, or NULL on error, or 0 and the name of thedevice if the <i>initString</i> was NULL.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./elt3c509End.html#top">elt3c509End</a></b><hr><a name="elt3c509Parse"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>elt3c509Parse</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>elt3c509Parse</i>( )</strong> - parse the init string</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS elt3c509Parse ( ELT3C509_DEVICE * pDrvCtrl, /* device pointer */ char * initString /* initialization info string */ )</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>:<port>:<intVector>:<intLevel>:<attachementType>:<noRxFrames></pre><dl><dt><i>unit</i><dd>Device unit number, a small integer.<p><dt><i>port</i><dd>base I/O address<p><dt><i>intVector</i><dd>Interrupt vector number (used with sysIntConnect)<p><dt><i>intLevel</i><dd>Interrupt level<p><dt><i>attachmentType</i><dd>type of Ethernet connector<p><dt><i>nRxFrames</i><dd> no. of Rx Frames in integer format </dl><p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR for invalid arguments.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./elt3c509End.html#top">elt3c509End</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -