📄 ceioctl.h
字号:
/* Output record: */
typedef struct {
VolumeInfoRecord info; /* VolumeInfoRecord is defined in blockdev.h */
FLStatus status;
} flDiskInfoOutput;
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Defragment volume (FL_IOCTL_DEFRAGMENT) */
/* Input record: */
typedef struct {
long requiredNoOfSectors; /* Minimum number of sectors to make available.
if -1 then a quick garbage collection operation
is invoked. */
} flDefragInput;
/* Outout record: */
typedef struct {
long actualNoOfSectors; /* Actual number of sectors available */
FLStatus status;
} flDefragOutput;
/*************************************************************************/
/* Write protection (FL_IOCTL_WRITE_PROTECT) */
/* Input record: */
#define FL_PROTECT 0
#define FL_UNPROTECT 1
#define FL_UNLOCK 2
typedef struct {
byte type; /* type of operation: FL_PROTECT\FL_UNPROTECT */
long password[2]; /* password */
} flWriteProtectInput;
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Mount volume (FL_IOCTL_MOUNT_VOLUME) */
/* Input record: */
typedef struct {
byte type; /* type of operation: FL_MOUNT\FL_DISMOUNT */
} flMountInput;
#define FL_MOUNT 0
#define FL_DISMOUNT 1
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Format volume (FL_IOCTL_FORMAT_VOLUME) */
#ifndef CE_DRIVER_LAYER
/*----------------------------------------------------------*/
/* User Format Parameters record for flFormatVolume routine */
/*----------------------------------------------------------*/
typedef FLStatus (*FLProgressCallback)(unsigned short totalUnitsToFormat, unsigned short totalUnitsFormattedSoFar);
typedef struct {
/* FTL formatting section */
long int bootImageLen;
/* Space to reserve for a boot-image at the start of the
medium. The FLite volume will begin at the next higher
erase unit boundary */
unsigned percentUse;
/* FTL performance depends on how full the Flash media is,
getting slower when the media is close to 100%. It is
possible to avoid the worst consequences of this effect by
formatting the media to less than 100% capacity, so
guaranteeing some free space at all times. This of course
sacrifices some capcity.
The standard value to use is 98 */
unsigned noOfSpareUnits;
/* BDTL partitions needs at least one spare erase unit to function as
a read/write media. That unit is normally taken from the transfer
units specified by the percentUsed field, but it is possible to
specify additional units (which takes more media space). This
ensures that if all the transfer units become bad and inerasable,
the spare unit enables TrueFFS to continue its read/write
functionality. Conversely, if no spare units are available the
media may switch into read-only mode. The standard value used is 1 */
DWORD vmAddressingLimit;
/* A part of the FTL Virtual Map always resides in RAM. The
RAM part is the one that is used to address the part of
the media below the VM addressing limit. Reading and
writing to this part is usually faster to some degree.
The downside is that the bigger the limit, the more RAM
size is required.
To get the extra RAM requirement in bytes, divide the
limit by 128 or by 256, depending on whether you
specified in #2.9 more than 32 or not, respectively.
The minimum VM limit is 0.
The standard value to use is 0x10000 (first 64 KBytes) */
FLProgressCallback progressCallback;
/* Progress callback routine, will be called if not NULL.
The callback routine is called after erasing each unit,
and its parameters are the total number of erase units
to format and the number erased so far.
The callback routine returns a Status value. A value of
OK (0) allows formatting to continue. Any other value
will abort the formatting with the returned status code. */
/* DOS formatting section */
char volumeId[4];
/* Volume identification number */
char far * volumeLabel;
/* Volume label string. If NULL, no label */
unsigned noOfFATcopies;
/* It is customary to format DOS media with 2 FAT copies.
The first copy is always used, but more copies make it
possible to recover if the FAT becomes corrupted (a
rare occurrence). On the other hand, this slows down
performance and uses media space.
The standard value to use is 2 */
unsigned embeddedCISlength;
/* Length in bytes of CIS to embed after the unit header */
char far * embeddedCIS;
/* The unit header is structured as a beginning of a PCMCIA
'tuple' chain (a CIS). The unit header contains a
data-organization tuple, which points past the end of the
unit header to a location which usually just contains
hex FF's which mark an 'end-of-tuple-chain'. Optionally,
it is possible to embed an entire CIS chain at this
location. If so, 'embeddedCISlength' marks the length in
bytes */
} FormatParams;
/*----------------------------------------------*/
/* User BDTL Partition Format Parameters record */
/*----------------------------------------------*/
typedef struct {
DWORD length;
/* The size of the usable storage space. The size will be
rounded upwards to a multiplication of a block size.
The size of the last partition will calculated automatically,
but if the requested size is greater then the remaining space
an error code will be returned,. Requesting zero size for any
partition but the last will generate an flBadParameters status. */
unsigned noOfSpareUnits;
/* BDTL needs at least one spare erase unit in order to function
as a read/write media. It is possible to specify more than one
spare unit, which takes more media space. The advantage of
specifying more than one spare unit is that if one of the flash
erase units becomes bad and inerasable in the future, then one
of the spare units can replace it. In that case, a second spare
unit enables TrueFFS to continue its read/write functionality,
whereas if no second spare unit is available the media goes into
read-only mode. The standard value used is 1 */
byte flags;
/* Available values for this field: */
#define TL_NORMAL_FORMAT 0
#define TL_FORMAT_FAT 2 /* Add FAT format on the media */
byte volumeId[4]; /* DOS partition identification number */
byte far * volumeLabel; /*DOS partition label string. If NULL, no label */
byte noOfFATcopies;
/* It is customary to format DOS media with two FAT copies. The
first copy is always used, but more copies make it possible
to recover if the FAT becomes corrupted (a rare occurrence).
On the other hand, this slows down performance and uses media
space. The standard value used is 2. */
byte protectionKey[8]; /* The key for the protection*/
byte protectionType;
/* PROTECTABLE - Can recieve protection */
/* READ_PROTECTED - Protect against read operations */
/* WRITE_PROTECTED - Protect against write operations */
/* LOCK_ENABLED - Enables the hardware lock signal */
/* PROTECTABLE - This partition can be protected */
/* CHANGEABLE_PROTECTION - protection type can be changed */
#ifdef COMPRESSION
unsigned short ratioDenominator;
unsigned short ratioNominator;
#endif /* COMPRESSION */
/* The ratio between the real media size and the virtual size
reported to the file system when compression is active. */
} BDTLPartitionFormatParams;
/*------------------------------------------------*/
/* User binary Partition Format Parameters record */
/*------------------------------------------------*/
typedef struct {
DWORD length; /* Required number of good blocks in the partition.*/
byte sign[4]; /* signature of the binary partition to format.
The signature 0xFFFF FFFF is not a valid signature */
byte signOffset; /* This field indicates one of the following modes : */
/* Available values for this field: */
/*#define TL_NORMAL_FORMAT 0 */
#define TL_SPL_FORMAT 0xb0
byte protectionKey[8]; /* The key for the protection*/
byte protectionType;
/* PROTECTABLE - Can recieve protection */
/* READ_PROTECTED - Protect against read operations */
/* WRITE_PROTECTED - Protect against write operations */
/* LOCK_ENABLED - Enables the hardware lock signal */
/* PROTECTABLE - This partition can be protected */
/* CHANGEABLE_PROTECTION - protection type can be changed */
} BinaryPartitionFormatParams;
typedef struct {
/*****************************/
/* Device formatting section */
/*****************************/
byte percentUse;
/* BDTL performance depends on how full the flash media is,
becoming slower as the media becomes closer to 100% full.
It is possible to avoid the worst-case performance
(at 100% full) by formatting the media to less than 100%
capacity, thus guaranteeing free space at all times. This
of course sacrifices some capacity. The standard value
used is 98 */
byte noOfBDTLPartitions;
/* Indicates the number of BDTL partitions (1 to 4). 0 will
cause a single STD_BDTL_PARAMS BDTL partition */
byte noOfBinaryPartitions;
/* Indicates the number of binary partitions (up to 3). 0 will
cause formatting with no binary partition. This value is ignored
unless the TL_BINARY_FORMAT flag is set in the irFlags f the ioreq */
BDTLPartitionFormatParams far* BDTLPartitionInfo;
/* BDTL partition information array */
BinaryPartitionFormatParams far* binaryPartitionInfo;
/* Binary partition information array*/
/***********************************/
/* Special format features section */
/***********************************/
byte cascadedDeviceNo; /* Not used */
byte noOfCascadedDevices; /* Not used */
FLProgressCallback progressCallback;
/* Progress callback routine, will be called if not NULL.
The callback routine is called after erasing each unit,
and its parameters are the total number of erase units
to format and the number erased so far.
The callback routine returns a Status value. A value of
OK (0) allows formatting to continue. Any other value
will abort the formatting with the returned status code. */
/* Note the following section is not used by for DiskOnChips */
/*************************************************************/
DWORD vmAddressingLimit;
/* A part of the FTL Virtual Map always resides in RAM. The
RAM part is the one that is used to address the part of
the media below the VM addressing limit. Reading and
writing to this part is usually faster to some degree.
The downside is that the bigger the limit, the more RAM
size is required.
To get the extra RAM requirement in bytes, divide the
limit by 128 or by 256, depending on whether you
specified in #2.9 more than 32 or not, respectively.
The minimum VM limit is 0.
The standard value to use is 0x10000 (first 64 KBytes) */
unsigned short embeddedCISlength;
/* Length in bytes of CIS to embed after the unit header */
byte far * embeddedCIS;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -