📄 idedrv.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/ideDrv.html - generated by refgen from ideDrv.c --> <title> ideDrv </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>ideDrv</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ideDrv</strong> - IDE disk device driver </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./ideDrv.html#ideDrv">ideDrv</a></i>( )</b> - initialize the IDE driver<br><b><i><a href="./ideDrv.html#ideDevCreate">ideDevCreate</a></i>( )</b> - create a device for a IDE disk<br><b><i><a href="./ideDrv.html#ideRawio">ideRawio</a></i>( )</b> - provide raw I/O access<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This is the driver for the IDE used on the PC 386/486.<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="./ideDrv.html#ideDrv">ideDrv</a></i>( )</b> toinitialize the driver, and <b><i><a href="./ideDrv.html#ideDevCreate">ideDevCreate</a></i>( )</b> to create devices.<p>Before the driver can be used, it must be initialized by calling <b><i><a href="./ideDrv.html#ideDrv">ideDrv</a></i>( )</b>.This routine should be called exactly once, before any reads, writes, orcalls to <b><i><a href="./ideDrv.html#ideDevCreate">ideDevCreate</a></i>( )</b>. Normally, it is called from <b><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>( )</b> in<b>usrConfig.c</b>.<p>The routine <b><i><a href="./ideDrv.html#ideRawio">ideRawio</a></i>( )</b> provides physical I/O access. Its firstargument is a drive number, 0 or 1; the second argument is a pointerto an <b>IDE_RAW</b> structure.<p></blockquote><h4>NOTE</h4><blockquote><p>Format is not supported, because IDE disks are already formatted, and badsectors are mapped.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ideDrv.html#top">ideDrv</a></b>, <i>VxWorks Programmer's Guide: I/O System</i><hr><a name="ideDrv"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ideDrv</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ideDrv</i>( )</strong> - initialize the IDE driver</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ideDrv ( int vector, /* interrupt vector */ int level, /* interrupt level */ BOOL manualConfig /* 1 = initialize drive parameters */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the IDE driver, sets up interrupt vectors,and performs hardware initialization of the IDE chip.<p>This routine should be called exactly once, before any reads, writes,or calls to <b><i><a href="./ideDrv.html#ideDevCreate">ideDevCreate</a></i>( )</b>. Normally, it is called by <b><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>( )</b>in <b>usrConfig.c</b>.<p>The <b><i><a href="./ideDrv.html#ideDrv">ideDrv</a></i>( )</b> call requires a configuration type, <i>manualConfig</i>. Ifthis argument is 1, the driver will initialize drive parameters; ifthe argument is 0, the driver will not initialize drive parameters.<p>The drive parameters are the number of sectors per track, the number ofheads, and the number of cylinders. They are stored in the structuretable <b>ideTypes[]</b> in <b>sysLib.c</b>. The table has two entries: the first isfor drive 0; the second is for drive 1. The table has two other memberswhich are used by the driver: the number of bytes per sector andthe precompensation cylinder. These two members should be set properly.Definitions of the structure members are:<pre> int cylinders; /* number of cylinders */ int heads; /* number of heads */ int sectorsTrack; /* number of sectors per track */ int bytesSector; /* number of bytes per sector */ int precomp; /* precompensation cylinder */</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if initialization fails.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ideDrv.html#top">ideDrv</a></b>, <b><i><a href="./ideDrv.html#ideDevCreate">ideDevCreate</a></i>( )</b><hr><a name="ideDevCreate"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ideDevCreate</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ideDevCreate</i>( )</strong> - create a device for a IDE disk</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>BLK_DEV *ideDevCreate ( int drive, /* drive number for hard drive (0 or 1) */ int nBlocks, /* device size in blocks (0 = whole disk) */ int blkOffset /* offset from start of device */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates a device for a specified IDE disk.<p><i>drive</i> is a drive number for the hard drive: it must be 0 or 1.<p>The <i>nBlocks</i> parameter specifies the size of the device, in blocks.If <i>nBlocks</i> is zero, the whole disk is used.<p>The <i>blkOffset</i> parameter specifies an offset, in blocks, from the startof the device to be used when writing or reading the hard disk. Thisoffset is added to the block numbers passed by the file system duringdisk accesses. (VxWorks file systems always use block numbers beginningat zero for the start of a 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="./ideDrv.html#top">ideDrv</a></b>, <b><i><a href="./dosFsLib.html#dosFsMkfs">dosFsMkfs</a></i>( )</b>, <b><i><a href="./dosFsLib.html#dosFsDevInit">dosFsDevInit</a></i>( )</b>, <b><i><a href="./rt11FsLib.html#rt11FsDevInit">rt11FsDevInit</a></i>( )</b>, <b><i><a href="./rt11FsLib.html#rt11FsMkfs">rt11FsMkfs</a></i>( )</b>, <b><i><a href="./rawFsLib.html#rawFsDevInit">rawFsDevInit</a></i>( )</b><hr><a name="ideRawio"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>ideRawio</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>ideRawio</i>( )</strong> - provide raw I/O access</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS ideRawio ( int drive, /* drive number for hard drive (0 or 1) */ IDE_RAW * pIdeRaw /* pointer to IDE_RAW structure */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine is called when the raw I/O access is necessary.<p><i>drive</i> is a drive number for the hard drive: it must be 0 or 1.<p>The <i>pIdeRaw</i> is a pointer to the structure <b>IDE_RAW</b> which is defined in <b>ideDrv.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ideDrv.html#top">ideDrv</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -