VxWorks Reference Manual : Libraries

ncr5390Lib1

NAME

ncr5390Lib1 - NCR 53C90 Advanced SCSI Controller (ASC) library (SCSI-1)

ROUTINES

ncr5390CtrlCreate( ) - create a control structure for an NCR 53C90 ASC

DESCRIPTION

This is the I/O driver for the NCR 53C90 Advanced SCSI Controller (ASC). It is designed to work in conjunction with scsiLib.

USER-CALLABLE ROUTINES

Most of the routines in this driver are accessible only through the I/O system. The only exception in this portion of the driver is the ncr5390CtrlCreate( ) which creates a controller structure.

INCLUDE FILES

ncr5390.h

SEE ALSO

ncr5390Lib1, scsiLib, NCR 53C90A, 53C90B Advanced SCSI Controller, VxWorks Programmer's Guide: I/O System


Libraries : Routines

ncr5390CtrlCreate( )

NAME

ncr5390CtrlCreate( ) - create a control structure for an NCR 53C90 ASC

SYNOPSIS

NCR_5390_SCSI_CTRL *ncr5390CtrlCreate
    (
    UINT8 * baseAdrs,      /* base address of ASC */
    int     regOffset,     /* addr offset between consecutive regs. */
    UINT    clkPeriod,     /* period of controller clock (nsec) */
    FUNCPTR ascDmaBytesIn, /* SCSI DMA input function */
    FUNCPTR ascDmaBytesOut /* SCSI DMA output function */
    )

DESCRIPTION

This routine creates a data structure that must exist before the ASC chip can be used. This routine must be called exactly once for a specified ASC, and must be the first routine called, since it calloc's a structure needed by all other routines in the library.

The input parameters are as follows:

baseAdrs
the address at which the CPU would access the lowest register of the ASC.

regOffset
the address offset (bytes) to access consecutive registers. (This must be a power of 2, for example, 1, 2, 4, etc.)

clkPeriod
the period, in nanoseconds, of the signal to the ASC clock input (used only for select command timeouts).

ascDmaBytesIn and ascDmaBytesOut
board-specific parameters to handle DMA input and output. If these are NULL (0), ASC program transfer mode is used. DMA is possible only during SCSI data in/out phases. The interface to these DMA routines must be of the form:
    STATUS xxDmaBytes{In, Out}
        (
        SCSI_PHYS_DEV  *pScsiPhysDev,  /* ptr to phys dev info    */
        UINT8          *pBuffer,       /* ptr to the data buffer  */
        int            bufLength       /* number of bytes to xfer */
        )

RETURNS

A pointer to an NCR_5390_SCSI_CTRL structure, or NULL if memory is insufficient or the parameters are invalid.

SEE ALSO

ncr5390Lib1