📄 if_fn.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>( )</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>( )</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>( )</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>( )</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>( )</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>( )</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>( )</b>. </dl><p></blockquote><h4>SYSTEM RESOURCE USAGE</h4><blockquote><p>When implemented, this driver requires the following system resources:<p> - one mutual exclusion semaphore<br> - one interrupt vector<br> - 3944 bytes in text section (text)<br> - 0 bytes in the initialized data section (data)<br> - 3152 bytes in the uninitialized data section (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>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>fnattach</i>( )</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 + -