📄 flioctl.h
字号:
#define PROTECTION_CHANGE_TYPE 6
/* Output record: */
typedef struct {
FLByte protectionType; /* see flflash.h for the protection attributes */
FLStatus status;
} flProtectionOutput;
#endif /* HW_PROTECTION */
/*************************************************************************/
#ifdef HW_OTP
/* One Time Programing operations: (FL_IOCTL_OTP */
/* OTP size \ OTP read \ OTP write and lock */
/* Input record: */
typedef struct {
FLDword length; /* Length to read\write\size */
FLDword usedSize; /* The written size of the area \ Area offset */
FLByte lockedFlag; /* The area condition LOCKED_OTP (flflash.h) */
FLByte FAR1* buffer; /* pointer to user buffer */
FLWord type; /* defined bellow */
} flOtpInput;
#define OTP_SIZE 1
#define OTP_READ 2
#define OTP_WRITE_LOCK 3
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Read customer ID (FL_IOCTL_CUSTOMER_ID) */
/* Input record: NULL */
/* Output record: */
typedef struct {
FLByte id[4];
FLStatus status;
} flCustomerIdOutput;
/*************************************************************************/
/* Read unique ID (FL_IOCTL_UNIQUE_ID) */
/* Input record: NULL */
/* Output record: */
typedef struct {
FLByte id[16];
FLStatus status;
} flUniqueIdOutput;
#endif /* HW_OTP */
/*************************************************************************/
/* Read unique ID (FL_IOCTL_NUMBER_OF_PARTITIONS) */
/* Input record: NULL */
/* Output record: */
typedef struct {
FLByte noOfPartitions;
FLStatus status;
} flCountPartitionsOutput;
/*************************************************************************/
/* Quary the device h/w and s/w capabilities (FL_IOCTL_INQUIRE_CAPABILITIES) */
#ifdef FL_LOW_LEVEL
/* Input record: */
typedef struct {
FLCapability capability; /* defined in blockdev.h */
} flCapabilityInput;
/* Output record: */
typedef struct {
FLCapability capability; /* defined in blockdev.h */
FLStatus status;
} flCapabilityOutput;
#endif /* FL_LOW_LEVEL */
/*************************************************************************/
/* Place EXB file by buffers (FL_IOCTL_PLACE_EXB_BY_BUFFER) */
#ifdef FL_LOW_LEVEL
#ifdef WRITE_EXB_IMAGE
/* Input record: */
typedef struct {
FLByte FAR1* buf; /* buffer of EXB file */
FLDword bufLen; /* buffer length */
FLByte exbFlags; /* a combination of EXB flags see flPlaceExbByBuffer routine */
/* The list of flags is defined in doc2exb.h */
FLWord exbWindow; /* explicitly set device window. 0 will automatcly set window */
} flPlaceExbInput;
#endif /* WRITE_EXB_IMAGE */
/* Output record: flOutputStatusRecord */
/*************************************************************************/
/* Place the device into and out of the power down mode (FL_IOCTL_DEEP_POWER_DOWN_MODE) */
typedef struct {
FLByte state; /* DEEP_POWER_DOWN - low power consumption */
/* otherwise - regular power consumption */
} flPowerDownInput;
/* DEEP_POWER_DOWN is defined in flflash.h */
#endif /* FL_LOW_LEVEL */
/* Output record: flOutputStatusRecord */
/*************************************************************************/
#ifdef ABS_READ_WRITE
/* Delete logical sectors (FL_IOCTL_DELETE_SECTORS) */
/* Input record: */
typedef struct {
FLSDword firstSector; /* First logical sector to delete */
FLSDword 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 {
FLSDword firstSector; /* first logical sector */
FLSDword numberOfSectors; /* Number of sectors to read\write */
FLByte FAR1 *buf; /* Data to read\write */
} flReadWriteInput;
/* Output record: */
typedef struct {
FLSDword numberOfSectors; /* Actual Number of sectors read\written */
FLStatus status;
} flReadWriteOutput;
#endif /* ABS_READ_WRITE */
/******************************************************************************/
/* Set environment variables values (FL_IOCTL_EXTENDED_ENVIRONMENT_VARIABLES) */
#ifdef ENVIRONMENT_VARS
/* Input record: */
typedef struct {
FLEnvVars varName; /* Enum describing the variable */
FLDword varValue; /* New variable value */
FLDword flags; /* FL_APPLY_TO_ALL - All socket and partitions */
/* FL_APPLY_TO_SOCKET - All socket and partitions */
/* FL_APPLY_TO_VOLUME - All socket and partitions */
} flExtendedEnvVarsInput;
#define FL_APPLY_TO_ALL 1
#define FL_APPLY_TO_SOCKET 2
#define FL_APPLY_TO_VOLUME 3
/* Output record: */
typedef struct {
FLDword prevValue; /* The previous value of the variable */
FLStatus status;
} flExtendedEnvVarsOutput;
#endif /* ENVIRONMENT_VARS */
/******************************************************************************/
/* Check partition for power failures symptoms (FL_IOCTL_VERIFY_VOLUME) */
#ifdef VERIFY_VOLUME
/* Input record: NULL */
typedef struct {
FLDword flags; /* Must be set to 0 */
} flVerifyVolumeInput;
/* Output record: */
typedef struct {
void FAR1* callBack; /* Must be set to null */
FLStatus status;
} flVerifyVolumeOutput;
#endif /* VERIFY_VOLUME */
/******************************************************************************/
#ifndef FL_NO_USE_FUNC
/* Plant user defined memory access routines (FL_IOCTL_SET_ACCESS_ROUTINE) */
/* Input record: */
typedef struct {
FLAccessStruct FAR1 * structPtr; /* Pointer memory access routine struct */
} flSetMemoryAccessInput;
/* Output record: flOutputStatusRecord */
#endif /* FL_NO_USE_FUNC */
/******************************************************************************/
/* Plant user defined memory access routines (FL_IOCTL_GET_ACCESS_ROUTINE) */
/* Input record: NULL */
#ifndef FL_NO_USE_FUNC
typedef struct {
FLAccessStruct FAR1 * structPtr; /* Pointer memory access routine struct */
FLStatus status;
} flGetMemoryAccessOutput;
#endif /* FL_NO_USE_FUNC */
/******************************************************************************/
#ifndef NO_IPL_CODE
/* Write IPL area for docPlus family (FL_IOCTL_WRITE_IPL) */
/* Input record: */
typedef struct {
FLByte FAR1* buf; /* IPL data buffer */
FLWord flags; /* IPL flags (see flflash.h) */
FLWord bufLen; /* IPL data buffer length */
} flIplInput;
/* Output record: flOutputStatusRecord */
#endif /* NO_IPL_CODE */
/******************************************************************************/
#ifdef RUGGEDIZED
/* Ruggedize opperation*/
typedef struct {
FLByte handle; /* Handle of transacrtion*/
FLByte mode; /* mode can be USE_SINGLE_TRANSACTION or USE_MULTIPLE_TRANSACTION*/
}flRuggedizeInput;
typedef struct {
FLByte handle;
FLStatus status;
}flRuggedizeOutput;
#endif /*RUGGEDIZED*/
/******************************************************************************/
/* Check quick mount validity (FL_IOCTL_IS_QUICK_MOUNT_VALID) */
#ifndef FL_NO_QUICK_MOUNT_FEATURE
/* Input record: NULL */
typedef struct {
FLByte mode; /* Either FL_ON for valid and FL_OFF for not */
FLStatus status;
} flGetQuickMountOutput;
#endif /* FL_NO_QUICK_MOUNT_FEATURE */
/******************************************************************************/
/* Write quick mount data (FL_IOCTL_WRITE_QUICK_MOUNT_INFO) */
#ifndef FL_NO_QUICK_MOUNT_FEATURE
/* Input record: NULL */
/* Output record: flOutputStatusRecord */
#endif /* FL_NO_QUICK_MOUNT_FEATURE */
/******************************************************************************/
/* Clear quick mount data (FL_IOCTL_CLEAR_QUICK_MOUNT_INFO) */
#ifndef FL_NO_QUICK_MOUNT_FEATURE
/* Input record: NULL */
/* Output record: flOutputStatusRecord */
#endif /* FL_NO_QUICK_MOUNT_FEATURE */
/******************************************************************************/
#ifndef FL_READ_ONLY
/* Complete the last write operation (FL_IOCTL_COMPLETE_OPERATION) */
/* Input record: NULL */
/* Output record: flOutputStatusRecord */
#endif /* FL_READ_ONLY */
#endif /* IOCTL_INTERFACE */
#endif /* FLIOCTL_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -