nec765fd.html
来自「vxworks相关论文」· HTML 代码 · 共 193 行
HTML
193 行
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/nec765Fd.html - generated by refgen from nec765Fd.c --> <title> nec765Fd </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>nec765Fd</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>nec765Fd</strong> - NEC 765 floppy disk device driver </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./nec765Fd.html#fdDrv">fdDrv</a></i>( )</b> - initialize the floppy disk driver<br><b><i><a href="./nec765Fd.html#fdDevCreate">fdDevCreate</a></i>( )</b> - create a device for a floppy disk<br><b><i><a href="./nec765Fd.html#fdRawio">fdRawio</a></i>( )</b> - provide raw I/O access<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This is the driver for the NEC 765 Floppy Chip 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="./nec765Fd.html#fdDrv">fdDrv</a></i>( )</b> toinitialize the driver, and <b><i><a href="./nec765Fd.html#fdDevCreate">fdDevCreate</a></i>( )</b> to create devices.Before the driver can be used, it must be initialized by calling <b><i><a href="./nec765Fd.html#fdDrv">fdDrv</a></i>( )</b>.This routine should be called exactly once, before any reads, writes, orcalls to <b><i><a href="./nec765Fd.html#fdDevCreate">fdDevCreate</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="./nec765Fd.html#fdRawio">fdRawio</a></i>( )</b> allows physical I/O access. Its first argument is adrive number, 0 to 3; the second argument is a type of diskette; the thirdargument is a pointer to the <b>FD_RAW</b> structure, which is defined in <b>nec765Fd.h</b>.<p>Interleaving is not supported when the driver formats.<p>Two types of diskettes are currently supported:3.5" 2HD 1.44MB and 5.25" 2HD 1.2MB. You can add additional diskettetypes to the <b>fdTypes[]</b> table in <b>sysLib.c</b>.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nec765Fd.html#top">nec765Fd</a></b>, <i>VxWorks Programmer's Guide: I/O System</i><hr><a name="fdDrv"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>fdDrv</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>fdDrv</i>( )</strong> - initialize the floppy disk driver</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS fdDrv ( int vector, /* interrupt vector */ int level /* interrupt level */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes the floppy driver, sets up interrupt vectors,and performs hardware initialization of the floppy chip.<p>This routine should be called exactly once, before any reads, writes,or calls to <b><i><a href="./nec765Fd.html#fdDevCreate">fdDevCreate</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></blockquote><h4>RETURNS</h4><blockquote><p>OK.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nec765Fd.html#top">nec765Fd</a></b>, <b><i><a href="./nec765Fd.html#fdDevCreate">fdDevCreate</a></i>( )</b>, <b><i><a href="./nec765Fd.html#fdRawio">fdRawio</a></i>( )</b><hr><a name="fdDevCreate"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>fdDevCreate</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>fdDevCreate</i>( )</strong> - create a device for a floppy disk</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>BLK_DEV *fdDevCreate ( int drive, /* driver number of floppy disk (0 - 3) */ int fdType, /* type of floppy disk */ 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 floppy disk.<p>The <i>drive</i> parameter is the drive number of the floppy disk;valid values are 0 to 3.<p>The <i>fdType</i> parameter specifies the type of diskette, which is describedin the structure table <b>fdTypes[]</b> in <b>sysLib.c</b>. <i>fdType</i> is an index tothe table. Currently the table contains two diskette types:<ul><li> An <i>fdType</i> of 0 indicates the first entry in the table (3.5" 2HD, 1.44MB);</li><li> An <i>fdType</i> of 1 indicates the second entry in the table (5.25" 2HD, 1.2MB). </ul><p>Members of the <b>fdTypes[]</b> structure are:<pre> int sectors; /* no of sectors */ int sectorsTrack; /* sectors per track */ int heads; /* no of heads */ int cylinders; /* no of cylinders */ int secSize; /* bytes per sector, 128 << secSize */ char gap1; /* gap1 size for read, write */ char gap2; /* gap2 size for format */ char dataRate; /* data transfer rate */ char stepRate; /* stepping rate */ char headUnload; /* head unload time */ char headLoad; /* head load time */ char mfm; /* MFM bit for read, write, format */ char sk; /* SK bit for read */ char *name; /* name */</pre>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 floppy 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.) Normally, <i>blkOffset</i> is 0.<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="./nec765Fd.html#top">nec765Fd</a></b>, <b><i><a href="./nec765Fd.html#fdDrv">fdDrv</a></i>( )</b>, <b><i><a href="./nec765Fd.html#fdRawio">fdRawio</a></i>( )</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="fdRawio"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>fdRawio</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>fdRawio</i>( )</strong> - provide raw I/O access</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS fdRawio ( int drive, /* drive number of floppy disk (0 - 3) */ int fdType, /* type of floppy disk */ FD_RAW * pFdRaw /* pointer to FD_RAW structure */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine is called when the raw I/O access is necessary.<p>The <i>drive</i> parameter is the drive number of the floppy disk;valid values are 0 to 3.<p>The <i>fdType</i> parameter specifies the type of diskette, which is describedin the structure table <b>fdTypes[]</b> in <b>sysLib.c</b>. <i>fdType</i> is an index tothe table. Currently the table contains two diskette types:<ul><li> An <i>fdType</i> of 0 indicates the first entry in the table (3.5" 2HD, 1.44MB);</li><li> An <i>fdType</i> of 1 indicates the second entry in the table (5.25" 2HD, 1.2MB). </ul><p><p>The <i>pFdRaw</i> is a pointer to the structure <b>FD_RAW</b>, defined in <b>nec765Fd.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./nec765Fd.html#top">nec765Fd</a></b>, <b><i><a href="./nec765Fd.html#fdDrv">fdDrv</a></i>( )</b>, <b><i><a href="./nec765Fd.html#fdDevCreate">fdDevCreate</a></i>( )</b></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?