⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tffsdrv.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
function must be called (exactly once) before calling any other TrueFFSutilities, such as <b><i><a href="./tffsDrv.html#tffsDevFormat">tffsDevFormat</a></i>(&nbsp;)</b> or <b><i><a href="./tffsDrv.html#tffsDevCreate">tffsDevCreate</a></i>(&nbsp;)</b>.  Typically, the callto <b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b> is handled for you automatically.  If you defined <b>INCLUDE_TFFS</b>in your BSP's <b>config.h</b>, the call to <b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b> is made from <b><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>(&nbsp;)</b>.  Ifyour BSP's <b>config.h</b> defines <b>INCLUDE_PCMCIA</b>, the call to <b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b> is madefrom <b><i><a href="./pccardLib.html#pccardTffsEnabler">pccardTffsEnabler</a></i>(&nbsp;)</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if it fails.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tffsDrv.html#top">tffsDrv</a></b><hr><a name="tffsDevCreate"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tffsDevCreate</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tffsDevCreate</i>(&nbsp;)</strong> - create a TrueFFS block device suitable for use with dosFs</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>BLK_DEV * tffsDevCreate    (    int tffsDriveNo,       /* TFFS drive number (0 - DRIVES-1) */    int removableMediaFlag /* 0 - nonremovable flash media */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates a TFFS block device on top of a flash device. It takes as arguments a drive number, determined from the order in which the socketcomponents were registered, and a flag integer that indicates whether the medium is removable or not. A zero indicates a non removable medium. A one indicates a removable medium.  If you intend to mount dosFs on this block device, you probably do not want to call <b><i><a href="./tffsDrv.html#tffsDevCreate">tffsDevCreate</a></i>(&nbsp;)</b>, but should call <b><i>usrTffsConfig</i>(&nbsp;)</b> instead.  Internally, <b><i>usrTffsConfig</i>(&nbsp;)</b> calls <b><i><a href="./tffsDrv.html#tffsDevCreate">tffsDevCreate</a></i>(&nbsp;)</b> for you.  It then does everything necessary (such as calling the <b><i><a href="./dosFsLib.html#dosFsDevInit">dosFsDevInit</a></i>(&nbsp;)</b> routine) to mount dosFs on the just created block device.  <p></blockquote><h4>RETURNS</h4><blockquote><p><b>BLK_DEV</b> pointer, or NULL if it failed.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tffsDrv.html#top">tffsDrv</a></b><hr><a name="tffsDevOptionsSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tffsDevOptionsSet</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tffsDevOptionsSet</i>(&nbsp;)</strong> - set TrueFFS volume options</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tffsDevOptionsSet    (    TFFS_DEV * pTffsDev /* pointer to device descriptor */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine is intended to set various TrueFFS volume options. At presentit only disables FAT monitoring. If VxWorks long file names are to be usedwith TrueFFS, FAT monitoring must be turned off.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if it failed.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tffsDrv.html#top">tffsDrv</a></b><hr><a name="tffsDevFormat"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tffsDevFormat</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tffsDevFormat</i>(&nbsp;)</strong> - format a flash device for use with TrueFFS</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tffsDevFormat    (    int tffsDriveNo, /* TrueFFS drive number (0 - DRIVES-1) */    int arg          /* pointer to tffsDevFormatParams structure */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine formats a flash device for use with TrueFFS.  It takes two parameters, a drive number and a pointer to a device format structure. This structure describes how the volume should be formatted.  The structure is defined in <b>dosformat.h</b>.  The drive number is assigned in the order that the socket component for the device was registered.<p>The format process marks each erase unit with an Erase Unit Header (EUH) andcreates the physical and virtual Block Allocation Maps (BAM) for the device. The erase units reserved for the "boot-image" are skipped and the firstEUH is placed at number (boot-image length - 1). To write to the boot-imageregion, call <b><i><a href="./tffsConfig.html#tffsBootImagePut">tffsBootImagePut</a></i>(&nbsp;)</b>. <p></blockquote><h4>WARNING</h4><blockquote><p>If any of the erase units in the boot-image region contains an erase unit header from a previous format call (this canhappen if you reformat a flash device specifying a larger boot region) TrueFFS fails to mount the device.  To fix this problem, use <b><i><a href="./tffsDrv.html#tffsRawio">tffsRawio</a></i>(&nbsp;)</b> toerase the problem erase units (thus removing the outdated EUH).  <p>The macro <b>TFFS_STD_FORMAT_PARAMS</b> defines the default values used for formatting a flask disk device. If the second argument to this routine is zero, <b><i><a href="./tffsDrv.html#tffsDevFormat">tffsDevFormat</a></i>(&nbsp;)</b> uses these default values.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if it failed.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tffsDrv.html#top">tffsDrv</a></b><hr><a name="tffsRawio"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tffsRawio</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tffsRawio</i>(&nbsp;)</strong> - low level I/O access to flash components</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tffsRawio    (    int tffsDriveNo, /* TrueFFS drive number (0 - DRIVES-1) */    int functionNo,  /* TrueFFS function code */    int arg0,        /* argument 0 */    int arg1,        /* argument 1 */    int arg2         /* argument 2 */    )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>Use the utilities provided by thisroutine with the utmost care. If you use these routines carelessly, you risk data loss as well as  permanent physical damage to the flash device.<p>This routine is a gateway to a series of utilities (listed below). Functions such as <b><i>mkbootTffs</i>(&nbsp;)</b> and <b><i><a href="./tffsConfig.html#tffsBootImagePut">tffsBootImagePut</a></i>(&nbsp;)</b> use these <b><i><a href="./tffsDrv.html#tffsRawio">tffsRawio</a></i>(&nbsp;)</b> utilities to write boot sector information. The functions for physical read, write, and erase are made available with the intention that they be used on erase units allocated to the boot-image region by <b><i><a href="./tffsDrv.html#tffsDevFormat">tffsDevFormat</a></i>(&nbsp;)</b>. Using these functions elsewhere could be dangerous.<p>The <i>arg0</i>, <i>arg1</i>, and <i>arg2</i> parameters to <b><i><a href="./tffsDrv.html#tffsRawio">tffsRawio</a></i>(&nbsp;)</b> are interpreted differently depending on the function number you specify for <i>functionNo</i>. The drive number is determined by the order in which the socket components were registered. <p><table><tr valign=top><th align=left>Function Name </th><th align=left> arg0 </th><th align=left> arg1 </th><th align=left> arg2</tr><tr><td colspan="5"><hr></tr><tr valign=top><td align=left><b>TFFS_GET_PHYSICAL_INFO</b> </td><td align=left> user buffer address </td><td align=left> N/A </td><td align=left> N/A</tr><tr valign=top><td align=left><b>TFFS_PHYSICAL_READ</b> </td><td align=left> address to read </td><td align=left> byte count </td><td align=left> user buffer address</tr><tr valign=top><td align=left><b>TFFS_PHYSICAL_WRITE</b> </td><td align=left> address to write </td><td align=left> byte count </td><td align=left> user buffer address</tr><tr valign=top><td align=left><b>TFFS_PHYSICAL_ERASE</b> </td><td align=left> first unit </td><td align=left> number of units </td><td align=left> N/A</tr><tr valign=top><td align=left><b>TFFS_ABS_READ</b> </td><td align=left> </td><td align=left> sector number </td><td align=left> number of sectors </td><td align=left> user buffer address</tr><tr valign=top><td align=left><b>TFFS_ABS_WRITE</b> </td><td align=left> sector number </td><td align=left> number of sectors </td><td align=left> user buffer address</tr><tr valign=top><td align=left><b>TFFS_ABS_DELETE</b> </td><td align=left> sector number </td><td align=left> number of sectors </td><td align=left> N/A</tr><tr valign=top><td align=left><b>TFFS_DEFRAGMENT_VOLUME</b> </td><td align=left> number of sectors </td><td align=left> user buffer address </td><td align=left> N/A</tr><tr valign=top><td align=left></tr></tr></table><b>TFFS_GET_PHYSICAL_INFO</b> writes the flash type, erasable block size, and mediasize to the user buffer specified in <i>arg0</i>.<p><b>TFFS_PHYSICAL_READ</b> reads <i>arg1</i> bytes from <i>arg0</i> and writes them to the buffer specified by <i>arg2</i>.<p><b>TFFS_PHYSICAL_WRITE</b> copies <i>arg1</i> bytes from the <i>arg2</i> buffer and writes them to the flash memory location specified by <i>arg0</i>.  <p><b>TFFS_PHYSICAL_ERASE</b> erases <i>arg1</i> erase units, starting at the erase unitspecified in <i>arg0</i>.<p><b>TFFS_ABS_READ</b> reads <i>arg1</i> sectors, starting at sector <i>arg0</i>, and writesthem to the user buffer specified in <i>arg2</i>.<p><b>TFFS_ABS_WRITE</b> takes data from the <i>arg2</i> user buffer and writes <i>arg1</i> sectors of it to the flash location starting at sector <i>arg0</i>.<p><b>TFFS_ABS_DELETE</b> deletes <i>arg1</i> sectors of data starting at sector <i>arg0</i>. <p><b>TFFS_DEFRAGMENT_VOLUME</b> calls the defragmentation routine with the minimumnumber of sectors to be reclaimed, <i>arg0</i>, and writes the actual number reclaimed in the user buffer by <i>arg1</i>. Calling this function through some low priority task will make writes more deterministic.No validation is done of the user specified address fields, so the functions assume they are writable. If the address is invalid, you could see bus errorsor segmentation faults.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if it failed.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tffsDrv.html#top">tffsDrv</a></b></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -