📄 sramdrv.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/sramDrv.html - generated by refgen from sramDrv.c --> <title> sramDrv </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>sramDrv</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>sramDrv</strong> - PCMCIA SRAM device driver </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./sramDrv.html#sramDrv">sramDrv</a></i>( )</b> - install a PCMCIA SRAM memory driver<br><b><i><a href="./sramDrv.html#sramMap">sramMap</a></i>( )</b> - map PCMCIA memory onto a specified ISA address space<br><b><i><a href="./sramDrv.html#sramDevCreate">sramDevCreate</a></i>( )</b> - create a PCMCIA memory disk device<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This is a device driver for the SRAM PC card. The memory location and sizeare specified when the "disk" is created.<p></blockquote><h4>USER-CALLABLE ROUTINES</h4><blockquote><p>Most of the routines in this driver are accessible only through the I/Osystem. However, two routines must be called directly: <b><i><a href="./sramDrv.html#sramDrv">sramDrv</a></i>( )</b> toinitialize the driver, and <b><i><a href="./sramDrv.html#sramDevCreate">sramDevCreate</a></i>( )</b> to create block devices.Additionally, the <b><i><a href="./sramDrv.html#sramMap">sramMap</a></i>( )</b> routine is called directly to map the PCMCIAmemory onto the ISA address space. Note that this routine does not useany mutual exclusion or synchronization mechanism; thus, special care mustbe taken in the multitasking environment.<p>Before using this driver, it must be initialized by calling <b><i><a href="./sramDrv.html#sramDrv">sramDrv</a></i>( )</b>. Thisroutine should be called only once, before any reads, writes, or calls to<b><i><a href="./sramDrv.html#sramDevCreate">sramDevCreate</a></i>( )</b> or <b><i><a href="./sramDrv.html#sramMap">sramMap</a></i>( )</b>. It can be called from <b><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>( )</b> in <b>usrConfig.c</b>or at some later point.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sramDrv.html#top">sramDrv</a></b>, <i>VxWorks Programmer's Guide: I/O System</i><hr><a name="sramDrv"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>sramDrv</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sramDrv</i>( )</strong> - install a PCMCIA SRAM memory driver</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS sramDrv ( int sock /* socket no. */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes a PCMCIA SRAM memory driver. It must be called once,before any other routines in the driver.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if the I/O system cannot install the driver.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sramDrv.html#top">sramDrv</a></b><hr><a name="sramMap"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>sramMap</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sramMap</i>( )</strong> - map PCMCIA memory onto a specified ISA address space</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>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 */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine maps PCMCIA memory onto a specified ISA address space.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if the memory cannot be mapped.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sramDrv.html#top">sramDrv</a></b><hr><a name="sramDevCreate"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>sramDevCreate</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>sramDevCreate</i>( )</strong> - create a PCMCIA memory disk device</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>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 */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates a PCMCIA memory disk device.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>A pointer to a block device structure (<b>BLK_DEV</b>), or NULL if memory cannotbe allocated for the device structure.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sramDrv.html#top">sramDrv</a></b>, <b><i><a href="./ramDrv.html#ramDevCreate">ramDevCreate</a></i>( )</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -