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

📄 if_fn.html

📁 vxworks相关论文
💻 HTML
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/if_fn.html - generated by refgen from if_fn.c --> <title> if_fn </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>if_fn</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>if_fn</strong> - Fujitsu MB86960 NICE Ethernet network interface driver </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./if_fn.html#fnattach">fnattach</a></i>(&nbsp;)</b>  -  publish the <b>fn</b> network interface and initialize the driver and device<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This module implements the Fujitsu MB86960 NICE Ethernet network interfacedriver.<p>This driver is non-generic and has only been run on the Fujitsu SPARCliteEvaluation Board.  It currently supports only unit number zero.The driver must be given several target-specific parameters, and some externalsupport routines must be provided.  These parameters, and the mechanisms usedto communicate them to the driver, are detailed 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>This driver provides the standard external interface with the followingexceptions.  All initialization is performed within the attach routine;there is no separate initialization routine.  Therefore, in the global interfacestructure, the function pointer to the initialization routine is NULL.<p>The only user-callable routine is <b><i><a href="./if_fn.html#fnattach">fnattach</a></i>(&nbsp;)</b>, which publishes the <b>fn</b>interface and initializes the driver and device.<p></blockquote><h4>TARGET-SPECIFIC PARAMETERS</h4><blockquote><p>External support routines provide all parameters:<dl><dt>device I/O address<dd>This parameter specifies the base address of the device's I/O registerset.  This address is assumed to live in SPARClite alternate addressspace.<p><dt>interrupt vector<dd>This parameter specifies the interrupt vector to be used by the driverto service an interrupt from the NICE device.  The driver will connectthe interrupt handler to this vector by calling <b><i><a href="./intArchLib.html#intConnect">intConnect</a></i>(&nbsp;)</b>.<p><dt>Ethernet address<dd>This parameter specifies the unique, six-byte address assigned to theVxWorks target on the Ethernet. </dl><p></blockquote><h4>EXTERNAL SUPPORT REQUIREMENTS</h4><blockquote><p>This driver requires five external support functions:<dl><dt>char *sysEnetIOAddrGet (int unit)<dd>This routine returns the base address of the NICEcontrol registers.  The driver calls this routine once, using <b><i><a href="./if_fn.html#fnattach">fnattach</a></i>(&nbsp;)</b>.<p><dt>int sysEnetVectGet (int unit)<dd>This routine returns the interrupt vector numberto be used to connect the driver's interrupt handler.The driver calls this routine once, using <b><i><a href="./if_fn.html#fnattach">fnattach</a></i>(&nbsp;)</b>.<p><dt>STATUS sysEnetAddrGet (int unit, char *pCopy)<dd>This routine provides the six-byte Ethernet addressused by <i>unit</i>.  It must copy the six-byteaddress to the space provided by <i>pCopy</i>.  It returns OK, or ERROR if it fails.The driver calls this routine once, using <b><i><a href="./if_fn.html#fnattach">fnattach</a></i>(&nbsp;)</b>.<p><dt>void sysEnetIntEnable (int unit), void sysEnetIntDisable (int unit)<dd>These routines enable or disable the interrupt from the NICE for thespecified <i>unit</i>.  Typically, this involves interrupt controller hardware,either internal or external to the CPU.  The driver calls these routines only during initialization, using <b><i><a href="./if_fn.html#fnattach">fnattach</a></i>(&nbsp;)</b>. </dl><p></blockquote><h4>SYSTEM RESOURCE USAGE</h4><blockquote><p>When implemented, this driver requires the following system resources:<p>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;one&nbsp;mutual&nbsp;exclusion&nbsp;semaphore<br>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;one&nbsp;interrupt&nbsp;vector<br>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;3944&nbsp;bytes&nbsp;in&nbsp;text&nbsp;section&nbsp;(text)<br>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;0&nbsp;bytes&nbsp;in&nbsp;the&nbsp;initialized&nbsp;data&nbsp;section&nbsp;(data)<br>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;3152&nbsp;bytes&nbsp;in&nbsp;the&nbsp;uninitialized&nbsp;data&nbsp;section&nbsp;(BSS)<p>The above data and BSS requirements are for the SPARClite architecture and mayvary for other architectures.  Code size (text) varies greatly betweenarchitectures and is therefore not quoted here.<p>The NICE device maintains a private buffer for all packets transmitted andreceived.  Therefore, the driver does not require any system memory to sharewith the device.  This also eliminates all data cache coherency issues.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./if_fn.html#top">if_fn</a></b>, <b><a href="./ifLib.html#top">ifLib</a></b><hr><a name="fnattach"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>fnattach</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>fnattach</i>(&nbsp;)</strong> - publish the <b>fn</b> network interface and initialize the driver and device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS fnattach    (    int unit /* unit number */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>The routine publishes the <b>fn</b> interface by filling in a network interfacerecord and adding this record to the system list.  This routine alsoinitializes the driver and the device to the operational state.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./if_fn.html#top">if_fn</a></b></body></html>

⌨️ 快捷键说明

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