⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flioctl.h

📁 电子盘DEMO板程序
💻 H
📖 第 1 页 / 共 2 页
字号:
                                      /*READ_PROTECTED, WRITE_PROTECTED, LOCK_ENABLED*/
                                      /*CHANGEABLE_PROTECTION, OTW_PROTECTED,        */
    FLByte key[8];                    /* The new key to the change Key call          */
    FLByte type;                      /* Operation type. available values are:       */
                                      /*PROTECTION_INSERT_KEY, PROTECTION_REMOVE_KEY,*/
                                      /*PROTECTION_GET_TYPE, PROTECTION_DISABLE_LOCK,*/
                                      /*PROTECTION_ENABLE_LOCK, PROTECTION_CHANGE_KEY,*/
                                      /*PROTECTION_CHANGE_TYPE                       */
} flProtectionInput;
#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
#define PROTECTION_APPLY_STICKY 7
/* Output record: */
typedef struct {
   FLByte protectionType;             /* Protection attributes. The following        */
                                      /*attributes can be ored: PROTECTABLE,         */ 
                                      /*READ_PROTECTED, WRITE_PROTECTED, LOCK_ENABLED*/
                                      /*LOCK_ASSERTED, KEY_INSERTED,                 */
                                      /*CHANGEABLE_PROTECTION, OTW_PROTECTED,        */
                                      /*STICKY_LOCK_ASSERTED                         */

   FLStatus status;
} flProtectionOutput;

/*************************************************************************/
/* 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 */

/*************************************************************************/
/* One Time Programing operations: (FL_IOCTL_MCOTP */
/*   OTP size \ OTP read \ OTP write and lock    */
/* Input record: */
typedef struct {
	FLWord        wPageNo ;         /* Page to write                              */
	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                             */
} flMCOtpInput;

#define MCOTP_SIZE        1
#define MCOTP_READ        2
#define MCOTP_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;

/*************************************************************************/
/* Read unique ID (FL_IOCTL_NUMBER_OF_PARTITIONS) */
/* Input record: NULL */
/* Output record: */
typedef struct {
	FLByte  noOfPartitions;
	FLStatus status;
} flCountPartitionsOutput;

/*************************************************************************/
/* Place the device into and out of the power down mode (FL_IOCTL_DEEP_POWER_DOWN_MODE) */

/* Input record:  */
typedef struct {
	FLByte  state; /* DEEP_POWER_DOWN - low power consumption           */
	               /* EXIT_DEEP_POWER_DOWN - regular power consumption  */
} flPowerDownInput;
/* Output record: flOutputStatusRecord */

#ifdef BDK_ACCESS
/*************************************************************************/
/* BDK operations read\write\erase\create (FL_IOCTL_BDK_OPERATION) */
/* Input record: */
typedef struct {
    FLByte type;                      /* type of operation. Available are:           */
                                      /*BDK_INIT_READ, BDK_READ, BDK_INIT_WRITE,     */
                                      /*BDK_WRITE, BDK_ERASE, BDK_CREATE,            */
                                      /*   BDK_GET_INFO                              */
    BDKStruct bdkStruct;              /* parameters for BDK operations               */
} flBDKOperationInput;
#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 */
#endif /*BDK_ACCESS*/

/******************************************************************************/
/* Set environment variables values (FL_IOCTL_EXTENDED_ENVIRONMENT_VARIABLES) */
/* 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;

/******************************************************************************/
/* Write IPL area for docPlus family (FL_IOCTL_WRITE_IPL) */
/* Input record:  */
typedef struct {
	FLByte   FAR1* bBufPtr; /* IPL data buffer           */
    FLDword dwFlags;           /* IPL flags. Available are: FL_IPL_MODE_NORMAL, */
                                      /*FL_IPL_DOWNLOAD, FL_IPL_MODE_XSCALE,	*/
                                      /*FL_USING_BUFFERS                            */
	FLSDword sdwLength;     /* IPL length                */
	FLSDword sdwOffset;     /* IPL offset                */
} flIPLInput;
/* Output record: flOutputStatusRecord */

/******************************************************************************/
/* Check quick mount validity (FL_IOCTL_IS_QUICK_MOUNT_VALID) */
/* Input record: NULL */
/* Output record: */
typedef struct {
	FLByte                mode; /* Either FL_ON for valid and FL_OFF for not */
	FLStatus              status;
} flGetQuickMountOutput;

/******************************************************************************/
/* Write quick mount data (FL_IOCTL_WRITE_QUICK_MOUNT_INFO) */
/* Input record: NULL */
/* Output record: flOutputStatusRecord */

/******************************************************************************/
/* Clear quick mount data (FL_IOCTL_CLEAR_QUICK_MOUNT_INFO) */
/* Input record: NULL */
/* 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;

/******************************************************************************/
/* Check partition for power failures symptoms (FL_IOCTL_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;

/******************************************************************************/
/* 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 */

/******************************************************************************/
/* Plant user defined memory access routines (FL_IOCTL_GET_ACCESS_ROUTINE) */
/* Input record: NULL */
/* Output record: */
typedef struct {
	FLAccessStruct FAR1 * structPtr; /* Pointer memory access routine struct */
	FLStatus              status;
} flGetMemoryAccessOutput;

#endif /* FLIOCTL_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -