VxWorks Reference Manual : Libraries
sramDrv - PCMCIA SRAM device driver
sramDrv( ) - install a PCMCIA SRAM memory driver
sramMap( ) - map PCMCIA memory onto a specified ISA address space
sramDevCreate( ) - create a PCMCIA memory disk device
This is a device driver for the SRAM PC card. The memory location and size are specified when the "disk" is created.
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.
sramDrv, VxWorks Programmer's Guide: I/O System
sramDrv( ) - install a PCMCIA SRAM memory driver
STATUS sramDrv ( int sock /* socket no. */ )
This routine initializes a PCMCIA SRAM memory driver. It must be called once, before any other routines in the driver.
OK, or ERROR if the I/O system cannot install the driver.
sramMap( ) - map PCMCIA memory onto a specified ISA address space
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 */ )
This routine maps PCMCIA memory onto a specified ISA address space.
OK, or ERROR if the memory cannot be mapped.
sramDevCreate( ) - create a PCMCIA memory disk device
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 */ )
This routine creates a PCMCIA memory disk device.
A pointer to a block device structure (BLK_DEV), or NULL if memory cannot be allocated for the device structure.
sramDrv, ramDevCreate( )