📄 wd33c93lib2.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/wd33c93Lib2.html - generated by refgen from wd33c93Lib2.c --> <title> wd33c93Lib2 </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>wd33c93Lib2</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>wd33c93Lib2</strong> - WD33C93 SCSI-Bus Interface Controller library (SCSI-2) </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./wd33c93Lib2.html#wd33c93CtrlCreateScsi2">wd33c93CtrlCreateScsi2</a></i>( )</b> - create and partially initialize an SBIC structure<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library contains part of the I/O driver for the Western Digital WD33C93 family of SCSI-2 Bus Interface Controllers (SBIC). It is designed to work with scsi2Lib. The driver routines in this library depend on theSCSI-2 ANSI specification; for general driver routines and for overall SBICdocumentation, see wd33c93Lib.<p></blockquote><h4>USER-CALLABLE ROUTINES</h4><blockquote><p>Most of the routines in this driver are accessible only through the I/Osystem. The only exception in this portion of the driver is<b><i><a href="./wd33c93Lib2.html#wd33c93CtrlCreateScsi2">wd33c93CtrlCreateScsi2</a></i>( )</b>, which creates a controller structure.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>wd33c93.h</b>, <b>wd33c93_2.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./wd33c93Lib.html#top">wd33c93Lib</a></b>2</b>, <b><a href="./scsiLib.html#top">scsiLib</a></b>, <b><a href="./scsi2Lib.html#top">scsi2Lib</a></b>, <b><a href="./wd33c93Lib.html#top">wd33c93Lib</a></b>, <i>VxWorks Programmer's Guide: I/O System</i><hr><a name="wd33c93CtrlCreateScsi2"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>wd33c93CtrlCreateScsi2</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>wd33c93CtrlCreateScsi2</i>( )</strong> - create and partially initialize an SBIC structure</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>WD_33C93_SCSI_CTRL *wd33c93CtrlCreateScsi2 ( UINT8 * sbicBaseAdrs, /* base address of the SBIC */ int regOffset, /* address offset between SBIC registers */ UINT clkPeriod, /* period of the SBIC clock (nsec) */ FUNCPTR sysScsiBusReset, /* function to reset SCSI bus */ int sysScsiResetArg, /* argument to pass to above function */ UINT sysScsiDmaMaxBytes, /* maximum byte count using DMA */ FUNCPTR sysScsiDmaStart, /* function to start SCSI DMA transfer */ FUNCPTR sysScsiDmaAbort, /* function to abort SCSI DMA transfer */ int sysScsiDmaArg /* argument to pass to above functions */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates an SBIC data structure and must be called before usingan SBIC chip. It must be called exactly once for a specified SBIC.Since it allocates memory for a structure needed by all routines in<b><a href="./wd33c93Lib.html#top">wd33c93Lib</a></b>2, it must be called before any other routines in the library.After calling this routine, at least one call to <b><i><a href="./wd33c93Lib.html#wd33c93CtrlInit">wd33c93CtrlInit</a></i>( )</b> mustbe made before any SCSI transaction is initiated using the SBIC.<p></blockquote><h4>NOTE</h4><blockquote><p>Only the non-multiplexed processor interface is supported.<p>A detailed description of the input parameters follows:<dl><dt><b>sbicBaseAdrs</b><dd>the address at which the CPU would access the lowest (AUX STATUS) register of the SBIC.<p><dt><b>regOffset</b><dd>the address offset (bytes) to access consecutive registers.(This must be a power of 2, for example, 1, 2, 4, etc.)<p><dt><b>clkPeriod</b><dd>the period in nanoseconds of the signal to SBIC CLK input.<p><dt><b>sysScsiBusReset</b> and <b>sysScsiResetArg</b><dd>the board-specific routine to pulse the SCSI bus RST signal.The specified argument is passed to this routine when it is called.It may be used to identify the SCSI bus to be reset, if there is achoice. The interface to this routine is of the form:<pre> void xxBusReset ( int arg; /* call-back argument */ )</pre><dt><b>sysScsiDmaMaxBytes</b>, <b>sysScsiDmaStart</b>, <b>sysScsiDmaAbort</b>, and <b>sysScsiDmaArg</b><dd> board-specific routines to handle DMA transfers to and from the SBIC;if the maximum DMA byte count is zero, programmed I/O is used.Otherwise, non-NULL function pointers to DMA start and abort routinesmust be provided.The specified argument is passed to these routines when they arecalled; it may be used to identify the DMA channel to use, for example.Note that DMA is implemented only during SCSI data in/out phases.The interface to these DMA routines must be of the form:<pre> STATUS xxDmaStart ( int arg; /* call-back argument */ UINT8 *pBuffer; /* ptr to the data buffer */ UINT bufLength; /* number of bytes to xfer */ int direction; /* 0 = SCSI->mem, 1 = mem->SCSI */ ) STATUS xxDmaAbort ( int arg; /* call-back argument */ )</pre></dl></blockquote><h4>RETURNS</h4><blockquote><p><p> A pointer to the SBIC structure, or NULL if memory is insufficient or the parameters are invalid.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./wd33c93Lib.html#top">wd33c93Lib</a></b>2</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -