📄 _blkdev.h
字号:
/* the file system, it should be mounted before file operations can be */
/* done on it. */
/* */
/* The volume automatically becomes unmounted if it is removed or */
/* changed. */
/* */
/* Parameters: */
/* irHandle : Socket number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irFlags : Number of hidden sectors. */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flMountVolume(ioreq) bdCall(FL_MOUNT_VOLUME,ioreq)
/*----------------------------------------------------------------------*/
/* f l A b s M o u n t V o l u m e */
/* */
/* Mounts, verifies or dismounts the Flash medium. */
/* */
/* The volume automatically becomes unmounted if it is removed or */
/* changed. */
/* */
/* Parameters: */
/* irHandle : Socket number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flAbsMountVolume(ioreq) bdCall(FL_ABS_MOUNT,ioreq)
/*----------------------------------------------------------------------*/
/* f l V e r i f y V o l u m e */
/* */
/* Verifies a mounted volume for partialy written sectors. */
/* */
/* Note: The volume must be mounted first. */
/* */
/* Parameters: */
/* irHandle : Socket number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irData : Must be set to NULL */
/* irLength : Must be set to 0 */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flVerifyVolume(ioreq) bdCall(FL_VERIFY_VOLUME,ioreq)
/*----------------------------------------------------------------------*/
/* f l L o a d V ol u m e s C a c h e */
/* */
/* Initialize the available cache. */
/* */
/* Notes: */
/* 1) The volume must be mounted first. */
/* 2) Currently the routines implementation is identical to */
/* flVerifyVolume. However future versions might add or remove */
/* some of the functionalities. */
/* */
/* Parameters: */
/* irHandle : Socket number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irData : Must be set to NULL */
/* irLength : Must be set to 0 */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flLoadVolumesCache(ioreq) bdCall(FL_LOAD_VOLUMES_CACHE,ioreq)
/*----------------------------------------------------------------------*/
/* f l D i s m o u n t V o l u m e */
/* */
/* Dismounts the volume. */
/* This call is not normally necessary, unless it is known the volume */
/* will soon be removed. */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flDismountVolume(ioreq) bdCall(FL_DISMOUNT_VOLUME,ioreq)
/*----------------------------------------------------------------------*/
/* f l C l o s e A l l F i l e s */
/* */
/* closes all opened files, and reset the Global Attention flag. */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flCloseAllFiles(ioreq) bdCall(FL_CLOSE_ALL_FILES,ioreq)
/*----------------------------------------------------------------------*/
/* f l C h e c k V o l u m e */
/* */
/* Verifies that the current volume is mounted. */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flCheckVolume(ioreq) bdCall(FL_CHECK_VOLUME,ioreq)
/*----------------------------------------------------------------------*/
/* r e a d B B T */
/* */
/* Read Bad Blocks Table of device to user buffer */
/* */
/* Note: The user buffer is filled with the address of the bad units */
/* the buffer maximum size is 2% of the number of TL units of the */
/* specific device * 4 bytes. therfore a 8M device of 8KB erase */
/* zone will need a maximum size buffer of 1024 * 0.02 * 4 = 82B */
/* and a 192M with 16KB erase zones will need 960Bytes */
/* */
/* Note: the buffer is not initialized by the function */
/* */
/* Parameters: */
/* irData : User buffer. */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/* irLength : returns the media size */
/* irFlags : returns the actual number of badBlocks */
/*----------------------------------------------------------------------*/
#define flReadBBT(ioreq) bdCall(FL_READ_BBT,ioreq)
/*----------------------------------------------------------------------*/
/* f l S e c t o r s I n V o l u m e */
/* */
/* Returns number of virtual sectors in volume. */
/* */
/* In case the inserted volume is not mounted, returns current status. */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/* irLength : number of virtual sectors in volume */
/*----------------------------------------------------------------------*/
#define flSectorsInVolume(ioreq) bdCall(FL_SECTORS_IN_VOLUME,ioreq)
#ifndef FL_READ_ONLY
#ifdef DEFRAGMENT_VOLUME
/*----------------------------------------------------------------------*/
/* f l D e f r a g m e n t V o l u m e */
/* */
/* Performs a general defragmentation and recycling of non-writable */
/* Flash areas, to achieve optimal write speed. */
/* */
/* NOTE: The required number of sectors (in irLength) may be changed */
/* (from another execution thread) while defragmentation is active. In */
/* particular, the defragmentation may be cut short after it began by */
/* modifying the irLength field to 0. */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irLength : Minimum number of sectors to make available for */
/* writes. */
/* */
/* Returns: */
/* irLength : Actual number of sectors available for writes */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flDefragmentVolume(ioreq) bdCall(FL_DEFRAGMENT_VOLUME,ioreq)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -