VxWorks Reference Manual : Libraries

sramDrv

NAME

sramDrv - PCMCIA SRAM device driver

ROUTINES

sramDrv( ) - install a PCMCIA SRAM memory driver
sramMap( ) - map PCMCIA memory onto a specified ISA address space
sramDevCreate( ) - create a PCMCIA memory disk device

DESCRIPTION

This is a device driver for the SRAM PC card. The memory location and size are specified when the "disk" is created.

USER-CALLABLE ROUTINES

Most of the routines in this driver are accessible only through the I/O system. However, two routines must be called directly: sramDrv( ) to initialize the driver, and sramDevCreate( ) to create block devices. Additionally, the sramMap( ) routine is called directly to map the PCMCIA memory onto the ISA address space. Note that this routine does not use any mutual exclusion or synchronization mechanism; thus, special care must be taken in the multitasking environment.

Before using this driver, it must be initialized by calling sramDrv( ). This routine should be called only once, before any reads, writes, or calls to sramDevCreate( ) or sramMap( ). It can be called from usrRoot( ) in usrConfig.c or at some later point.

SEE ALSO

sramDrv, VxWorks Programmer's Guide: I/O System


Libraries : Routines

sramDrv( )

NAME

sramDrv( ) - install a PCMCIA SRAM memory driver

SYNOPSIS

STATUS sramDrv
    (
    int sock /* socket no. */
    )

DESCRIPTION

This routine initializes a PCMCIA SRAM memory driver. It must be called once, before any other routines in the driver.

RETURNS

OK, or ERROR if the I/O system cannot install the driver.

SEE ALSO

sramDrv


Libraries : Routines

sramMap( )

NAME

sramMap( ) - map PCMCIA memory onto a specified ISA address space

SYNOPSIS

STATUS sramMap
    (
    int sock,   /* socket no. */
    int type,   /* 0: common 1: attribute */
    int start,  /* ISA start address */
    int stop,   /* ISA stop address */
    int offset, /* card offset address */
    int extraws /* extra wait state */
    )

DESCRIPTION

This routine maps PCMCIA memory onto a specified ISA address space.

RETURNS

OK, or ERROR if the memory cannot be mapped.

SEE ALSO

sramDrv


Libraries : Routines

sramDevCreate( )

NAME

sramDevCreate( ) - create a PCMCIA memory disk device

SYNOPSIS

BLK_DEV *sramDevCreate
    (
    int sock,         /* socket no. */
    int bytesPerBlk,  /* number of bytes per block */
    int blksPerTrack, /* number of blocks per track */
    int nBlocks,      /* number of blocks on this device */
    int blkOffset     /* no. of blks to skip at start of device */
    )

DESCRIPTION

This routine creates a PCMCIA memory disk device.

RETURNS

A pointer to a block device structure (BLK_DEV), or NULL if memory cannot be allocated for the device structure.

SEE ALSO

sramDrv, ramDevCreate( )