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

📄 tffsdrv.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/tffsDrv.html - generated by refgen from tffsDrv.c --> <title> tffsDrv </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>tffsDrv</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>tffsDrv</strong> - TrueFFS interface for VxWorks </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b>  -  initialize the TrueFFS system<br><b><i><a href="./tffsDrv.html#tffsDevCreate">tffsDevCreate</a></i>(&nbsp;)</b>  -  create a TrueFFS block device suitable for use with dosFs<br><b><i><a href="./tffsDrv.html#tffsDevOptionsSet">tffsDevOptionsSet</a></i>(&nbsp;)</b>  -  set TrueFFS volume options<br><b><i><a href="./tffsDrv.html#tffsDevFormat">tffsDevFormat</a></i>(&nbsp;)</b>  -  format a flash device for use with TrueFFS<br><b><i><a href="./tffsDrv.html#tffsRawio">tffsRawio</a></i>(&nbsp;)</b>  -  low level I/O access to flash components<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This module defines the routines that VxWorks uses to create a TrueFFSblock device.  Using this block device, dosFs can access a board-residentflash memory array or a flash memory card (in the PCMCIA slot) just as if it was a standard disk drive.  Also defined in this file are functions that you can use to format the flash medium, as well as well as functions that handle the low-level I/O to the device.<p>To include TrueFFS for Tornado in a VxWorks image, you must edit your BSP's<b>config.h</b> and define <b>INCLUDE_TFFS</b>, or, for some hardware, <b>INCLUDE_PCMCIA</b>. Ifyou define <b>INCLUDE_TFFS</b>, this configures <b><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>(&nbsp;)</b> to call <b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b>.  If youdefined <b>INCLUDE_PCMCIA</b>, the call to <b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b> is made from <b><i><a href="./pccardLib.html#pccardTffsEnabler">pccardTffsEnabler</a></i>(&nbsp;)</b>.The call to <b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b> sets up the structures, global variables, and mutual exclusion semaphore needed to manage TrueFFS.  This call to <b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b> also registers socket component drivers for each flash device found attached to the target. <p>These socket component drivers are not quite block devices, but they are an essential layer within TrueFFS.  Their function is to manage the hardwareinterface to the flash device, and they are intelligent enough to handle formatting and raw I/O requests to the flash device.  The other two layers within TrueFFS are known as the translation layer and the MTD (the Memory Technology Driver).  The translation layer of TrueFFS implements the error recover and wear-leveling features of TrueFFS.  The MTD implements the low-level programming (map, read, write, and erase) of the flash medium.  <p>To implement the socket layer, each BSP that supports TrueFFS includes a <b>sysTffs.c</b> file.  This file contains the code that defines the socket component driver.  This file also contains a set of defines that you can use to configure which translation layer modules and MTDs are included in TrueFFS.Which translation layer modules and MTDs you should include depends onwhich types of flash devices you need to support.  Currently, there are three basic flash memory technologies, NAND-based, NOR-based, and SSFDC.Within <b>sysTffs.c</b>, define:<p><dl><dt><b>INCLUDE_TL_NFTL</b><dd>To include the NAND-based translation layer module.<p><dt><b>INCLUDE_TL_FTL</b><dd>To include the NOR-based translation layer module.<p><dt><b>INCLUDE_TL_SSFDC</b><dd>To include the SSFDC-appropriate translation layer module.  </dl><p>To support these different technologies, TrueFFS ships with three differentimplementations of the translation layer.  Optionally, TrueFFS can includeall three modules.  TrueFFS later binds the appropriate translation layer module to the flash device when it registers a socket component driver forthe device.  <p>Within these three basic flash device categories there are still other differences (largely manufacturer-specific).  These differences have no impact on the translation layer.  However, they do make a difference for the MTD.  Thus, TrueFFS ships with eight different MTDs that can support a variety of flash devices from Intel, Sharp, Samsung, National, Toshiba, AMD, and Fujitsu.  Within <b>sysTffs.c</b>, define:<p><dl><dt><b>INCLUDE_MTD_I28F016</b><dd>For Intel 28f016 flash devices.<p><dt><b>INCLUDE_MTD_I28F008</b><dd>For Intel 28f008 flash devices.<p><dt><b>INCLUDE_MTD_I28F008_BAJA</b><dd>For Intel 28f008 flash devices on the Heurikon Baja 4000.<p><dt><b>INCLUDE_MTD_AMD</b><dd>For AMD, Fujitsu: 29F0{40,80,16} 8-bit flash devices.<p><dt><b>INCLUDE_MTD_CDSN</b><dd>For Toshiba, Samsung: NAND CDSN flash devices.<p><dt><b>INCLUDE_MTD_DOC2</b><dd>For Toshiba, Samsung: NAND DOC flash devices.<p><dt><b>INCLUDE_MTD_CFISCS</b><dd>For CFI/SCS flash devices.<p><dt><b>INCLUDE_MTD_WAMD</b><dd>For AMD, Fujitsu 29F0{40,80,16} 16-bit flash devices. </dl><p>The socket component driver and the MTDs are provided in source form.  If you need to write your own socket driver or MTD, use these working driversas a model for your own.<p></blockquote><h4>EXTERNALLY CALLABLE ROUTINES</h4><blockquote><p>Most of the routines defined in this file are accessible through the I/Osystem only.  However, four routines are callable externally.  Theseare: <b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b>, <b><i><a href="./tffsDrv.html#tffsDevCreate">tffsDevCreate</a></i>(&nbsp;)</b>, <b><i><a href="./tffsDrv.html#tffsDevFormat">tffsDevFormat</a></i>(&nbsp;)</b>, and <b><i><a href="./tffsDrv.html#tffsRawio">tffsRawio</a></i>(&nbsp;)</b>.<p>The first routine called from this library must be <b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b>.  Call this routine exactly once.  Normally, this is handled automatically for you from within <b><i><a href="./usrConfig.html#usrRoot">usrRoot</a></i>(&nbsp;)</b>, if <b>INCLUDE_TFFS</b> is defined, or from within <b><i><a href="./pccardLib.html#pccardTffsEnabler">pccardTffsEnabler</a></i>(&nbsp;)</b>, if <b>INCLUDE_PCMCIA</b> is defined.  <p>Internally, this call to <b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b> registers socket component drivers for all the flash devices connected to your system.  After registering a socketcomponent driver for the device, TrueFFS can support calls to <b><i><a href="./tffsDrv.html#tffsDevFormat">tffsDevFormat</a></i>(&nbsp;)</b> or <b><i><a href="./tffsDrv.html#tffsRawio">tffsRawio</a></i>(&nbsp;)</b>.  However, before you can mount dosFs on the flash device, you must call <b><i><a href="./tffsDrv.html#tffsDevCreate">tffsDevCreate</a></i>(&nbsp;)</b>.  This call creates a block device on top of the socket component driver, but does not mount dosFs on the device.  Because mounting dosFs on the device is what you will want to do most of the time, the <b>sysTffs.c</b> file defines a helper function, <b><i>usrTffsConfig</i>(&nbsp;)</b>.  Internally, this function calls <b><i><a href="./tffsDrv.html#tffsDevCreate">tffsDevCreate</a></i>(&nbsp;)</b> and 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 resulting block device.<p>LOW LEVEL I/ONormally, you should handle your I/O to the flash device using dosFs.  However, there are situations when that level of indirection is a problem.To handle such situations, this library defines <b><i><a href="./tffsDrv.html#tffsRawio">tffsRawio</a></i>(&nbsp;)</b>.  Using this function, you can bypass both dosFs and the TrueFFS translation servicesto program the flash medium directly.  <p>However, you should not try to program the flash device directly unless you are intimately familiar with the physical limits of your flash device as well as with how TrueFFS formats the flash medium.  Otherwise you risk not only corrupting the medium entirely but permanently damaging the flash device.<p>If all you need to do is write a boot image to the flash device, usethe <b><i><a href="./tffsConfig.html#tffsBootImagePut">tffsBootImagePut</a></i>(&nbsp;)</b> utility instead of <b><i><a href="./tffsDrv.html#tffsRawio">tffsRawio</a></i>(&nbsp;)</b>.  This function provides safer access to the flash medium.  <p></blockquote><h4>IOCTL</h4><blockquote><p>This driver responds to all ioctl codes by setting a global error flag.Do not attempt to format a flash drive using ioctl calls. <p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>tffsDrv.h</b>, <b>fatlite.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./tffsDrv.html#top">tffsDrv</a></b><hr><a name="tffsDrv"></a><p align=right><a href="rtnIndex.html"><i>Libraries :  Routines</i></a></p></blockquote><h1><i>tffsDrv</i>(&nbsp;)</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong><i>tffsDrv</i>(&nbsp;)</strong> - initialize the TrueFFS system</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS tffsDrv (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets up the structures, the global variables, and the mutual exclusion semaphore needed to manage TrueFFS. This call also registers socket component drivers for all the flash devices attached to your target.  <p>Because <b><i><a href="./tffsDrv.html#tffsDrv">tffsDrv</a></i>(&nbsp;)</b> is the call that initializes the TrueFFS system, this

⌨️ 快捷键说明

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