📄 ceioctl.h
字号:
/* 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 */
} FormatParams2;
#endif /*CE_DRIVER_LAYER*/
/* Format volume (FL_IOCTL_FORMAT_VOLUME) */
/* Input record: */
typedef struct {
byte formatType; /* type of format as defined in blockdev.h */
FormatParams fp; /* Format parameters structure (defined in flformat.h) */
} flFormatInput;
/*type of format values are: */
#define FAT_ONLY_FORMAT 0
#define TL_FORMAT 1
#define TL_FORMAT_IF_NEEDED 2
#define TL_FORMAT_ONLY 8
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Format volume (FL_IOCTL_FORMAT_PHYSICAL_DRIVE) */
/* Input record: */
typedef struct {
byte formatType; /* type of format as defined in blockdev.h */
FormatParams2 fp; /* Format parameters structure (defined in flformat.h) */
} flFormatPhysicalInput;
/*type of format values are: */
/*#define FAT_ONLY_FORMAT 0 */
/*#define TL_FORMAT 1 */
/*#define TL_FORMAT_IF_NEEDED 2 */
#define TL_LEAVE_BINARY_AREA 8
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* BDK operations read\write\erase\create (FL_IOCTL_BDK_OPERATION) */
/* Input record: */
/* The following structure is used for SDK internal calls, Do not use it when calling TrueFFS driver.
Use the flBDKOperationInput structure.*/
/*************************************************************************/
/* BDK struct used when formating for BDK partition settings */
#ifndef CE_DRIVER_LAYER
#define BDK_SIGNATURE_NAME 4
typedef struct {
byte oldSign[BDK_SIGNATURE_NAME];
byte newSign[BDK_SIGNATURE_NAME];
byte signOffset;
DWORD startingBlock;
DWORD length;
byte flags;
byte far *bdkBuffer;
} BDKStruct;
/*Available values for flags: */
#define ERASE_BEFORE_WRITE 8
#define EXTRA_SIZE 16
#else
typedef struct {
byte type; /* type of operation: BDK_INIT_READ\BDK_READ\BDK_INIT_WRITE\ */
/* BDK_WRITE\BDK_ERASE\BDK_CREATE\BDK_GET_INFO */
BDKStruct bdkStruct; /* parameters for BDK operations (defined in docbdk.h) */
} flCEBDKOperationInput;
#endif /*CE_DRIVER_LAYER*/
/* This is the inpur record used:*/
typedef struct {
byte partitionNumber;
byte type; /* type of operation: BDK_INIT_READ\BDK_READ\BDK_INIT_WRITE\ */
/* BDK_WRITE\BDK_ERASE\BDK_CREATE\BDK_GET_INFO */
BDKStruct bdkStruct; /* parameters for BDK operations (defined in docbdk.h) */
} flBDKOperationInput;
/* Available values for type are:*/
#define BDK_INIT_READ 0
#define BDK_READ 1
#define BDK_INIT_WRITE 2
#define BDK_WRITE 3
#define BDK_ERASE 4
#define BDK_CREATE 5
#define BDK_GET_INFO 6
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* BDK and BDTL protection operations: (FL_IOCTL_BINARY_HW_PROTECTION) */
/* (FL_IOCTL_BDTL_HW_PROTECTION) */
/* insert key \ remove key \ identify \ change key \ */
/* change protection type \ change lock status */
/* Input record: */
typedef struct {
byte protectionType; /* see flflash.h for the protection attributes */
byte key[8]; /* The new key to the change Key call */
byte type; /* Operation type see list bellow */
} flProtectionInput;
typedef struct {
byte partitionNumber; /* the BDK partition number */
byte protectionType; /* see list bellow for the protection attributes */
byte key[8]; /* The new key to the change Key call */
byte type; /* Operation type see list bellow */
} flBDKProtectionInput;
#define PROTECTION_INSERT_KEY 0
#define PROTECTION_REMOVE_KEY 1
#define PROTECTION_GET_TYPE 2
#define PROTECTION_DISABLE_LOCK 3
#define PROTECTION_ENABLE_LOCK 4
#define PROTECTION_CHANGE_KEY 5
#define PROTECTION_CHANGE_TYPE 6
/* The options for protection attributes are:*/
#define PROTECTABLE 1 /* partition can recieve protection */
#define READ_PROTECTED 2 /* partition is read protected */
#define WRITE_PROTECTED 4 /* partition is write protected */
#define LOCK_ENABLED 8 /* HW lock signal is enabled */
#define LOCK_ASSERTED 16 /* HW lock signal is asserted */
#define KEY_INSERTED 32 /* key is inserted (not currently */
#define CHANGEABLE_PROTECTION 64 /* changeable protection area type */
#define OTW_PROTECTED 128 /* partition is locked forever */
#define STICKY_LOCK_ASSERTED 256 /* Sticky lock is activated */
/* Output record: */
typedef struct {
byte protectionType; /* see flflash.h for the protection attributes */
FLStatus status;
} flProtectionOutput;
/*************************************************************************/
/* One Time Programing operations: (FL_IOCTL_OTP */
/* OTP size \ OTP read \ OTP write and lock */
/* Input record: */
typedef struct {
DWORD length; /* Length to read\write\size */
DWORD usedSize; /* The written size of the area \ Area offset */
byte lockedFlag; /* The area condition LOCKED_OTP (flflash.h) */
byte far* buffer; /* pointer to user buffer */
unsigned short type; /* defined bellow */
} flOtpInput;
/* Values for type are: */
#define OTP_SIZE 1
#define OTP_READ 2
#define OTP_WRITE_LOCK 3
/* LOCKED_OTP definition: */
#define LOCKED_OTP 1
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Read customer ID (FL_IOCTL_CUSTOMER_ID) */
/* Input record: NULL */
/* Output record: */
typedef struct {
byte id[4];
FLStatus status;
} flCustomerIdOutput;
/*************************************************************************/
/* Read unique ID (FL_IOCTL_UNIQUE_ID) */
/* Input record: NULL */
/* Output record: */
typedef struct {
byte id[16];
FLStatus status;
} flUniqueIdOutput;
/*************************************************************************/
/* Read unique ID (FL_IOCTL_NUMBER_OF_PARTITIONS) */
/* Input record: NULL */
/* Output record: */
typedef struct {
byte noOfPartitions;
FLStatus status;
} flCountPartitionsOutput;
/*************************************************************************/
/* Quary the device h/w and s/w capabilities (FL_IOCTL_INQUIRE_CAPABILITIES) */
/*************************************************************************/
/* Quary the device h/w and s/w capabilities */
#ifndef CE_DRIVER_LAYER
typedef enum{
CAPABILITY_NOT_SUPPORTED = 0,
CAPABILITY_SUPPORTED = 1,
SUPPORT_UNERASABLE_BBT = 2,
SUPPORT_MULTIPLE_BDTL_PARTITIONS = 3,
SUPPORT_MULTIPLE_BINARY_PARTITIONS = 4,
SUPPORT_HW_PROTECTION = 5,
SUPPORT_HW_LOCK_KEY = 6,
SUPPORT_CUSTOMER_ID = 7,
SUPPORT_UNIQUE_ID = 8,
SUPPORT_DEEP_POWER_DOWN_MODE = 9,
SUPPORT_OTP_AREA = 10,
SUPPORT_WRITE_IPL_ROUTINE = 11,
SUPPORT_OTW_PROTECTION = 12,
SUPPORT_STICKY_LOCK_PROTECTION = 13
}FLCapability;
#endif /*CE_DRIVER_LAYER*/
/* Input record: */
typedef struct {
FLCapability capability; /* defined in blockdev.h */
} flCapabilityInput;
/* Output record: */
typedef struct {
FLCapability capability; /* defined in blockdev.h */
FLStatus status;
} flCapabilityOutput;
/*************************************************************************/
/* Place EXB file by buffers (FL_IOCTL_PLACE_EXB_BY_BUFFER) */
/* Input record: */
typedef struct {
byte far* buf; /* buffer of EXB file */
DWORD bufLen; /* buffer length */
byte exbFlags; /* a combination of EXB flags see flPlaceExbByBuffer routine */
/* The list of flags is defined in doc2exb.h */
unsigned short exbWindow; /* explicitly set device window. 0 will automatcly set window */
} flPlaceExbInput;
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Write IPL area for docPlus family (FL_IOCTL_WRITE_IPL) */
/* This is an old API, it is used only for backward campatability.*/
/* Input record: */
typedef struct {
byte far* buf; /* IPL data buffer */
unsigned short bufLen; /* IPL data buffer length */
} flIplOldInput;
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/*************************************************************************/
/* Write IPL area for docPlus family (FL_IOCTL_EXTENDED_WRITE_IPL) */
/* Input record: */
typedef struct {
byte far* buf; /* IPL data buffer */
unsigned short flags; /* IPL flags (see flflash.h) */
unsigned short bufLen; /* IPL data buffer length */
} flIplInput;
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Place the device into and out of the power down mode (FL_IOCTL_DEEP_POWER_DOWN_MODE) */
typedef struct {
byte state; /* DEEP_POWER_DOWN - low power consumption */
/* otherwise - regular power consumption */
} flPowerDownInput;
#define EXIT_DEEP_POWER_DOWN 0 /* must be the same as in blockdev.h */
#define DEEP_POWER_DOWN 1 /* must be the same as in blockdev.h */
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Delete logical sectors (FL_IOCTL_DELETE_SECTORS) */
/* Input record: */
typedef struct {
long firstSector; /* First logical sector to delete */
long numberOfSectors; /* Number of sectors to delete */
} flDeleteSectorsInput;
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* read & write logical sectors (FL_IOCTL_READ_SECTORS & FL_IOCTL_WRITE_SECTORS) */
/* Input record: */
typedef struct {
long firstSector; /* first logical sector */
long numberOfSectors; /* Number of sectors to read\write */
byte far *buf; /* Data to read\write */
} flReadWriteInput;
/* Output record: */
typedef struct {
long numberOfSectors; /* Actual Number of sectors read\written */
FLStatus status;
} flReadWriteOutput;
/*************************************************************************/
/* Mount volume (FL_IOCTL_UPDATE_XIP_MODE) */
/* Input record: */
typedef struct {
byte mode; /*FL_ON or FL_OFF - type of update XIP mode */
byte handle; /*Partition which is used for bin FS that is being updated.*/
} flUpdateXIPInput;
#define FL_MOUNT 0
#endif /*FLIOCTL_H*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -