User’s Guide
21020285 D
Chapter 4 Command Operation
Example ‘C’ Routines for Command List
Page 4 - 23
Example ‘C’
Routines for
Command List
The following ‘C’ listing is included here as an example of how you may set-
up the Parameter Block, Status Block and Command List structures and
manipulate the Command List Indexes.
/* Global Defines: */
#define EMPTY 0
#define NPB
100 /* NPB - Num of Parameter Blocks in Command List. */
#define NSB
200 /* NSB - Num of Status Blocks in Command List. */
#define BYTE
unsigned char
/* an 8 bit value */
#define WORD
unsigned int
/* a 16 bit value */
#define DWORD unsigned long
/* a 32 bit value */
/* parameter_block - a structure used to pass a command to the RF3880 VME to
* SCSI adapter. The fields are:
*/
typedef struct
{
DWORD
identifier;
/* identifier - command identifier. */
BYTE
flags-2;
/* command flags. */
BYTE
flags-1;
/* command flags. */
BYTE
modifier;
/* modifier - address modifier. */
BYTE
target;
/* target - target ID or adpater ID. */
/* possible values for flags-1 */
#defineCF_VALID
0x80 /* dat and dir bits valid. */
#defineCF_FREE
0x40 /* reserved bit, not used. */
#defineCF_INHIBIT_CMD_COMPLETE0x20 /* command list, synch control. */
#defineCF_FREE1
0x10 /* reserved bit, not used.*/
#defineCF_IRS
0x08 /* inhibit request-sense. */
#defineCF_DATA
0x04 /* data for this opration. */
#defineCF_DIR
0x02 /* direction; 1 = (writes). */
/* possible values for flags-2 */
#defineCF_JUST_SEND_MSG
0x08 /* message-only operation. */
#defineCF_INHIBIT_DISCONNECT
0x04 /* inhibit disconnect. */
#defineCF_TAG_MESSAGE_TYPE
0x02 /* tag message type. */
union
{
WORD
w[2];
DWORD
d;
} sdp;
/* sdp - source/dest. memory address */
union
{
WORD
w[2];
DWORD
d;
} bytes;
/* bytes - data transfer count */
Summary of Contents for Rimfire 3880
Page 1: ...Rimfire 3880 SCSI Host Bus Adapter User s Guide Ciprico Inc Publication No 21020285 D...
Page 2: ......
Page 4: ...21020285 D User s Guide...
Page 25: ...2 H a r d w a r e E s s e n t i a l s...
Page 42: ...21020285 D User s Guide Chapter 2 Hardware Essentials Page 2 18 Descriptions of Port Usage...
Page 43: ...3 H a r d w a r e I n s t a l l a t i o n...
Page 59: ...4 C o m m a n d O p e r a t i o n...
Page 85: ...5 I n i t i a t o r M o d e P a s s t h r o u g h C o m m a n d s...
Page 103: ...6 T a r g e t M o d e P a s s t h r o u g h C o m m a n d s...
Page 125: ...7 B o a r d c o n t r o l C o m m a n d s...
Page 175: ...8 D e t a i l s o f U s a g e...
Page 193: ...A E r r o r C o d e s...
Page 201: ...B C a b l e s a n d C o n n e c t o r s...
Page 206: ...21020285 D User s Guide Appendix B Cables and Connectors Page B 6 VMEbus Connector Pinouts...
Page 207: ...C S p e c i f i c a t i o n s...
Page 210: ...21020285 D User s Guide Appendix C Specifications Page C 4 Specifications...
Page 211: ...D D e f a u l t s...
Page 216: ...21020285 D User s Guide Appendix D Defaults Page D 6 HardwareDefaults...
Page 217: ...E D e s i g n D i f f e r e n c e s...
Page 229: ......
Page 230: ...21020285 D...