📄 ncr5390lib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/ncr5390Lib.html - generated by refgen from ncr5390Lib.c --> <title> ncr5390Lib </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>ncr5390Lib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ncr5390Lib</strong> - NCR5390 SCSI-Bus Interface Controller library (SBIC) </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./ncr5390Lib.html#ncr5390CtrlInit">ncr5390CtrlInit</a></i>( )</b> - initialize the user-specified fields in an ASC structure<br><b><i><a href="./ncr5390Lib.html#ncr5390Show">ncr5390Show</a></i>( )</b> - display the values of all readable NCR5390 chip registers<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library contains the main interface routines to the SCSI-BusInterface Controllers (SBIC). These routines simply switch the callsto the SCSI-1 or SCSI-2 drivers, implemented in <b><a href="./ncr5390Lib.html#top">ncr5390Lib</a></b><b>1.c</b> or<b><a href="./ncr5390Lib.html#top">ncr5390Lib</a></b><b>2.c</b> as configured by the Board Support Package (BSP).<p>In order to configure the SCSI-1 driver, which depends upon <b><a href="./scsi1Lib.html#top">scsi1Lib</a></b>, the<b><i><a href="./ncr5390Lib1.html#ncr5390CtrlCreate">ncr5390CtrlCreate</a></i>( )</b> routine, defined in <b><a href="./ncr5390Lib.html#top">ncr5390Lib</a></b>1, must be invoked. Similarly <b><i><a href="./ncr5390Lib2.html#ncr5390CtrlCreateScsi2">ncr5390CtrlCreateScsi2</a></i>( )</b>, defined in <b><a href="./ncr5390Lib.html#top">ncr5390Lib</a></b>2 and dependenton <b><a href="./scsi2Lib.html#top">scsi2Lib</a></b>, must be called to configure and initialize the SCSI-2 driver.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>ncr5390.h</b>, <b>ncr5390_1.h</b>, <b>ncr5390_2.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr5390Lib.html#top">ncr5390Lib</a></b><hr><a name="ncr5390CtrlInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ncr5390CtrlInit</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ncr5390CtrlInit</i>( )</strong> - initialize the user-specified fields in an ASC structure</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ncr5390CtrlInit ( int * pAsc, /* ptr to ASC info */ int scsiCtrlBusId, /* SCSI bus ID of this ASC */ UINT defaultSelTimeOut, /* default dev. select timeout (microsec) */ int scsiPriority /* priority of task when doing SCSI I/O */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes an ASC structure, after the structure is createdwith <b><i><a href="./ncr5390Lib1.html#ncr5390CtrlCreate">ncr5390CtrlCreate</a></i>( )</b>.This structure must be initialized before the ASC can be used.It may be called more than once; however, it should be called only while there is no activity on the SCSI interface.<p>Before returning, this routine pulses RST (reset) on the SCSI bus, thusresetting all attached devices.<p>The input parameters are as follows:<dl><dt><i>pAsc</i><dd>a pointer to the <b>NCR5390_SCSI_CTRL</b> structure created with<b><i><a href="./ncr5390Lib1.html#ncr5390CtrlCreate">ncr5390CtrlCreate</a></i>( )</b>.<p><dt><i>scsiCtrlBusId</i><dd>the SCSI bus ID of the ASC, in the range 0 - 7. The ID is somewhatarbitrary; the value 7, or highest priority, is conventional.<p><dt><i>defaultSelTimeOut</i><dd>the timeout, in microseconds, for selecting a SCSI device attached to thiscontroller. This value is used as a default if no timeout is specified in<b><i><a href="./scsiLib.html#scsiPhysDevCreate">scsiPhysDevCreate</a></i>( )</b>. The recommended value zero (0) specifies<b>SCSI_DEF_SELECT_TIMEOUT</b> (250 millisec). The maximum timeout possible isapproximately 2 seconds. Values exceeding this revert to themaximum. <p><dt><i>scsiPriority</i><dd> the priority to which a task is set when performing a SCSItransaction. Valid priorities are 0 to 255. Alternatively, the value -1specifies that the priority should not be altered during SCSI transactions.<p></dl></blockquote><h4>RETURNS</h4><blockquote><p><p> OK, or ERROR if a parameter is out of range.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr5390Lib.html#top">ncr5390Lib</a></b>, <b><i><a href="./scsiLib.html#scsiPhysDevCreate">scsiPhysDevCreate</a></i>( )</b>, <hr><a name="ncr5390Show"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ncr5390Show</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ncr5390Show</i>( )</strong> - display the values of all readable NCR5390 chip registers</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int ncr5390Show ( int * pScsiCtrl /* ptr to SCSI controller info */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine displays the state of the ASC registers in a user-friendlymanner. It is useful primarily for debugging. It should not be invokedwhile another running process is accessing the SCSI controller.<p></blockquote><h4>EXAMPLE</h4><blockquote><p><p><pre> -> ncr5390Show REG #00 (Own ID ) = 0x07 REG #01 (Control ) = 0x00 REG #02 (Timeout Period ) = 0x20 REG #03 (Sectors ) = 0x00 REG #04 (Heads ) = 0x00 REG #05 (Cylinders MSB ) = 0x00 REG #06 (Cylinders LSB ) = 0x00 REG #07 (Log. Addr. MSB ) = 0x00 REG #08 (Log. Addr. 2SB ) = 0x00 REG #09 (Log. Addr. 3SB ) = 0x00 REG #0a (Log. Addr. LSB ) = 0x00 REG #0b (Sector Number ) = 0x00 REG #0c (Head Number ) = 0x00 REG #0d (Cyl. Number MSB) = 0x00 REG #0e (Cyl. Number LSB) = 0x00 REG #0f (Target LUN ) = 0x00 REG #10 (Command Phase ) = 0x00 REG #11 (Synch. Transfer) = 0x00 REG #12 (Xfer Count MSB ) = 0x00 REG #13 (Xfer Count 2SB ) = 0x00 REG #14 (Xfer Count LSB ) = 0x00 REG #15 (Destination ID ) = 0x03 REG #16 (Source ID ) = 0x00 REG #17 (SCSI Status ) = 0x42 REG #18 (Command ) = 0x07</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if <i>pScsiCtrl</i> and <i>pSysScsiCtrl</i> are both NULL.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ncr5390Lib.html#top">ncr5390Lib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -