The VF library constructs a virtual file system in a specified region. The VF library has the following characteristics:
OSGetTime()).
VFOpenFile(), consume stack space of about 3 KB.
To learn how to use the VF library, see ./build/demos/vfdemo/.
Sample demo programs for NAND drives are provided.
Functions declarations are in the ./include/revolution/vf.h header file.
After the necessary device initialization, initialize the VF library by calling VFInit(). VFFinalize() must be called when finished.
(drive) mount
↓
file operations
↓
(drive) unmount
2006/06/01 Fixed a bug that caused an infinite loop when usingVFDeleteFile(W). 2006/06/09 Added an argument toVFReadFile()to get the size of the loaded file. 2006/06/16 Because there was a bug when the file system type was set to FAT32, reverted to the original format in which the FAT type is automatically set according to the volume size. 2006/06/27 Revised code when NAND is used. Every timeVFWriteFile()is called, it flushes. Eliminated the alignment restriction for buffers passed byVFWriteFile()andVFReadFile(). 2006/07/14 AddedVFMove{File, Dir}(W)andVFRename{File, Dir}(W). 2006/08/09 AddedVFCutFileSize(W). 2006/08/24 AddedVFFormatDrive(W). (From now on, after mounting a vff file for the first time, please format it. See the demo for criteria.) 2006/09/12 AddedVFInitEx()andVFFinalize(). 2006/09/13 AddedVFIsAvailable(). 2006/09/14 Fixed a bug that prevented mounting after mounting and unmounting 31 times, using a different drive name. 2006/09/15 Fixed a critical section bug. 2006/09/21 Fixed a bug related to the log name. Fixed the problem when attaching (mounting) with the same drive name twice. (An error is now returnedVFErr.) 2006/09/26 Increased the speed ofVFFormatDrive()when mounting NAND. AddedVFSyncandVFFileSync. 2006/09/27 Changed code so that the cache can be set when mounting.VFMountDrive,VFAttachDrive2006/09/29 Corrected theVF_ERR_ENOEXECthat was returned when there was no space on the drive duringVFWriteFiletoVF_ERR_ENOSPC. AddedVFBuffering(default isVF_WRITE_BACK_ON_SIGNIF_API). 2006/10/02 Corrected problems with various APIs when handling drive names. Included a caution regarding the use of uppercase and lowercase in drive names in the Introduction. 2006/10/11 Changed behavior so thatVF_ERR_VFF_FILE_FORMATis returned when an illegal file is specified during mount. When the preceding error is detected, create the.vfffile again after deleting it. 2006/10/12 Revised specifications so thatVF_ERR_NOT_ALLOCATED_DRVis returned whenactivateis called beforeattachhas succeeded. 2006/10/13 AddedVFDeleteSystemFileNANDFlash. 2006/10/17 Corrected a problem where errors from theVFGetFileSizeByFd,VFGetOffsetByFd, andVFGetDriveFreeSizeWfunctions were not being shown by theVFGetLastErrorfunction. 2006/10/18 Corrected a problem that prevented -1 from being returned when an internal error occurred with the 2006/10/17 version of theVFGetFileSizeByFdfunction.
2006/10/25 AddedNANDCheckto the sample demos. 2006/10/27 Added theVF_DTA_GET_FILE_SECONDS(vta)macro to get the file update time from the file search information (VFDta). 2006/10/30 Added a caution regarding stacks in the Introduction and Notes. 2006/11/09 AddedVFUnmountDriveForceto unmount a drive even if a file is open. AddedVFInactivateDriveForceto invalidate a drive even if a file is open. 2006/11/14 Added detailed description to the VFErr document. 2007/04/27 Added VFSetTimeStampCallback. 2007/05/08 Made revisions to the manual. AddedVFGetApiErrorStringto the manual. 2007/06/26 Fixed region corruption that occurred when the same drive was repeatedly mounted and unmounted.
.vff files. (2006/06/23)VFCreateFile() or VFOpenFile() in directories that contain many files consumes processing time. To improve the processing time, set the cache to match the maximum number of files allowed to exist.VFFormatDrive().VF_ERR_VFF_FILE_FORMAT is returned when an illegal file is specified during mount. When the preceding error is detected, create the .vff file again after deleting it.
NANDCheck within the application when creating files in NAND memory.
VFOpenFile(), consume stack space of about 3 KB.
CONFIDENTIAL