📄 _blkdev.h
字号:
#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)
#endif /* DEFRAGMENT_VOLUME */
#ifdef FORMAT_VOLUME
/*----------------------------------------------------------------------*/
/* f l F o r m a t V o l u m e */
/* */
/* Performs formatting of the DiskOnChip. */
/* All existing data is destroyed. */
/* */
/* Note : This routine does not support some of the new feature */
/* introduces in OSAK 5.0 and was left in order to support */
/* backwards compatibility with application build on OSAK 4.2 */
/* and down. */
/* */
/* Parameters: */
/* irHandle : Socket number (0, 1, ...) */
/* : Partition number must be 0 */
/* irFlags : TL_FORMAT : Translation layer formatting */
/* + FAT formating */
/* TL_FORMAT_IF_NEEDED: Translation layer formatting */
/* only if current format is */
/* invalid + FAT format */
/* : FAT_ONLY_FORMAT : FAT only formatting */
/* : TL_FORMAT_ONLY : Translation layer formatting */
/* without FAT format */
/* irData : Address of FormatParams structure to use */
/* (defined in format.h) */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flFormatVolume(ioreq) bdCall(BD_FORMAT_VOLUME,ioreq)
/*----------------------------------------------------------------------*/
/* f l F o r m a t P h i s i c a l D r i v e */
/* */
/* Performs formatting of the DiskOnChip. */
/* All existing data is destroyed. */
/* */
/* Note : This routine is the format routine for OSAK 5.0 and up. */
/* */
/* Parameters: */
/* irHandle : Socket number (0, 1, ...) */
/* Partition number must be 0 */
/* irFlags : */
/* TL_NORMAL_FORMAT : Normal format */
/* TL_LEAVE_BINARY_AREA : Leave the previous binary area */
/* TL_LEAVE_SOME_BINARY_AREA : Leave some of the previous */
/* binary partitions. */
/* irData : Address of FormatParams2 structure to use */
/* (defined in format.h) */
/* irLength : If the TL_LEAVE_SOME_BINARY_AREA flag is set, */
/* this field will indicate the number of binary */
/* partitions to leave. */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flFormatPhysicalDrive(ioreq) bdCall(BD_FORMAT_PHYSICAL_DRIVE,ioreq)
/*----------------------------------------------------------------------*/
/* f l F o r m a t L o g i c a l D r i v e */
/* */
/* Performs formatting of a single block device partition of a */
/* DiskOnChip. All existing data of the partition is destroyed. */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irData : Address of BDTLPartitionFormatParams structure */
/* to use (defined in format.h) */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flFormatLogicalDrive(ioreq) bdCall(BD_FORMAT_LOGICAL_DRIVE,ioreq)
/*----------------------------------------------------------------------*/
/* w r i t e B B T */
/* */
/* Erase the flash medium while marking bad block with 2 zeros in the */
/* first page of the unit. This state is the virgin state of the flash */
/* device allowing it to be reformated while incorporating the written */
/* bad blocks. */
/* */
/* Note that tl units are marked and not actual erasable blocks */
/* */
/* Parameters: */
/* irData : User buffer. */
/* irLength : Size of the media to erase. */
/* irFlags : User buffer length in bytes. */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flWriteBBT(ioreq) bdCall(FL_WRITE_BBT,ioreq)
#endif /* FORMAT_VOLUME */
#endif /*FL_READ_ONLY */
#ifdef ABS_READ_WRITE
/*----------------------------------------------------------------------*/
/* f l A b s R e a d */
/* */
/* Reads absolute sectors by sector no. */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irData : Address of user buffer to read into */
/* irSectorNo : First sector no. to read (sector 0 is the */
/* DOS boot sector). */
/* irSectorCount : Number of consectutive sectors to read */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/* irSectorCount : Number of sectors actually read */
/*----------------------------------------------------------------------*/
#define flAbsRead(ioreq) bdCall(FL_ABS_READ,ioreq)
/*----------------------------------------------------------------------*/
/* f l A b s A d d r e s s */
/* */
/* Returns the current physical media offset of an absolute sector by */
/* sector no. */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irSectorNo : Sector no. to address (sector 0 is the DOS */
/* boot sector) */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/* irCount : Offset of the sector on the physical media */
/*----------------------------------------------------------------------*/
#define flAbsAddress(ioreq) bdCall(FL_ABS_ADDRESS,ioreq)
/*----------------------------------------------------------------------*/
/* f l G e t B P B */
/* */
/* Reads the BIOS Parameter Block from the boot sector */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irData : Address of user buffer to read BPB into */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flGetBPB(ioreq) bdCall(FL_GET_BPB,ioreq)
#ifndef FL_READ_ONLY
/*----------------------------------------------------------------------*/
/* f l A b s W r i t e */
/* */
/* Writes absolute sectors by sector no. */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irData : Address of user buffer to write from */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -