📄 blockdev.h
字号:
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flInsertProtectionKey(ioreq) bdCall(FL_PROTECTION_INSERT_KEY,ioreq)
#define bdkInsertProtectionKey(ioreq) bdCall(FL_BINARY_PROTECTION_INSERT_KEY,ioreq)
#define flIplInsertProtectionKey(ioreq) bdCall(FL_IPL_PROTECTION_INSERT_KEY,ioreq)
/*----------------------------------------------------------------------*/
/* f l R e m o v e P r o t e c t i o n K e y */
/* b d k R e m o v e P r o t e c t i o n K e y */
/* f l I p l R e m o v e P r o t e c t i o n K e y */
/* */
/* Remove the protection key making the partition protected again */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flRemoveProtectionKey(ioreq) bdCall(FL_PROTECTION_REMOVE_KEY,ioreq)
#define bdkRemoveProtectionKey(ioreq) bdCall(FL_BINARY_PROTECTION_REMOVE_KEY,ioreq)
#define flIplRemoveProtectionKey(ioreq) bdCall(FL_IPL_PROTECTION_REMOVE_KEY,ioreq)
/*----------------------------------------------------------------------*/
/* f l H a r d w a r e P r o t e c t i o n L o c k */
/* b d k H a r d w a r e P r o t e c t i o n L o c k */
/* */
/* Enabled or disabled the affect of the hardware LOCK signal */
/* The hardware lock signal disables the removal of protection through */
/* the key therefore the partition will remain protected until the */
/* hardware LOCK signal will be removed */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irFlags : LOCK_ENABLED locks the partition otherwise */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flHardwareProtectionLock(ioreq) bdCall(FL_PROTECTION_SET_LOCK,ioreq)
#define bdkHardwareProtectionLock(ioreq) bdCall(FL_BINARY_PROTECTION_CHANGE_LOCK,ioreq)
/*----------------------------------------------------------------------*/
/* f l C h a n g e P r o t e c t i o n K e y */
/* b d k C h a n g e P r o t e c t i o n K e y */
/* f l I p l C h a n g e P r o t e c t i o n K e y */
/* */
/* Changes the current protection key with a new one. */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irData : Pointer to the new 8 bytes key array */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flChangeProtectionKey(ioreq) bdCall(FL_PROTECTION_CHANGE_KEY,ioreq)
#define bdkChangeProtectionKey(ioreq) bdCall(FL_BINARY_PROTECTION_CHANGE_KEY,ioreq)
#define flIplChangeProtectionKey(ioreq) bdCall(FL_IPL_PROTECTION_CHANGE_KEY,ioreq)
/*----------------------------------------------------------------------*/
/* f l C h a n g e P r o t e c t i o n T y p e */
/* b d k C h a n g e P r o t e c t i o n T y p e */
/* f l I p l C h a n g e P r o t e c t i o n T y p e */
/* */
/* Changes the protection attributes of the partitions. */
/* In order for a partition to change its protection type (without */
/* reformating the media) it must have the CHANGEABLE_PRTOECTION */
/* attribute. */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flChangeProtectionType(ioreq) bdCall(FL_PROTECTION_CHANGE_TYPE,ioreq)
#define bdkChangeProtectionType(ioreq) bdCall(FL_BINARY_PROTECTION_SET_TYPE,ioreq)
#define flIplChangeProtectionType(ioreq) bdCall(FL_IPL_PROTECTION_CHANGE_TYPE,ioreq)
/*----------------------------------------------------------------------*/
/* f l A p p l y S t i c k y L o c k */
/* */
/* Enable the sticky lock mode to all relevant partitions */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Must be set to 0 */
/* bits 3-0 - Socket # (zero based) */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flApplyStickyLock(ioreq) bdCall(FL_PROTECTION_STICKY_LOCK,ioreq)
/*----------------------------------------------------------------------*/
/* f l O T P S i z e */
/* */
/* Get the OTP size and stated */
/* */
/* Parameters: */
/* irHandle : Socket number ( 0,1,2... ) */
/* 4 LSB - Socket number */
/* irLength : The size of the used OTP area in bytes */
/* irCount : The size of the OTP ara in bytes */
/* irFlags : LOCKED_OTP for a locked area otherwise unlocked */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flOTPSize(ioreq) bdCall(FL_OTP_SIZE,ioreq)
/*----------------------------------------------------------------------*/
/* f l O T P W r i t e A n d L o c k */
/* */
/* Write to the OTP area while locking it at the end. */
/* */
/* Parameters: */
/* irHandle : Socket number ( 0,1,2... ) */
/* 4 LSB - Socket number */
/* irData : pointer to user buffer to write from */
/* irLength : number of bytes to write */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flOTPWriteAndLock(ioreq) bdCall(FL_OTP_WRITE,ioreq)
/*----------------------------------------------------------------------*/
/* f l O T P R e a d */
/* */
/* Read from the OTP area */
/* */
/* Parameters: */
/* irHandle : Socket number ( 0,1,2... ) */
/* 4 LSB - Socket number */
/* irData : pointer to user buffer to read into */
/* irLength : number of bytes to read */
/* irCount : offset to read from (starting at the begining of */
/* the OTP area */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flOTPRead(ioreq) bdCall(FL_OTP_READ,ioreq)
/*----------------------------------------------------------------------*/
/* f l G e t U n i q u e I D */
/* */
/* Returns the 16 bytes device unique ID */
/* */
/* Parameters: */
/* irHandle : Socket number ( 0,1,2... ) */
/* 4 LSB - Socket number */
/* irData : pointer to a 16 bytes buffer to read into the */
/* unique ID data */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/* irData : 16 bytes unique ID buffer */
/*----------------------------------------------------------------------*/
#define flGetUniqueID(ioreq) bdCall(FL_UNIQUE_ID,ioreq)
/*----------------------------------------------------------------------*/
/* f l G e t C u s t o m e r I D */
/* */
/* Returns the 4 bytes customer ID */
/* */
/* Parameters: */
/* irHandle : Socket number ( 0,1,2... ) */
/* 4 LSB - Socket number */
/* irData : pointer to a 4 bytes buffer to read into the */
/* customer ID */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/* irData : 4 bytes unique ID buffer */
/*----------------------------------------------------------------------*/
#define flGetCustomerID(ioreq) bdCall(FL_CUSTOMER_ID,ioreq)
/*----------------------------------------------------------------------*/
/* f l D e e p P o w e r D o w n M o d e */
/* */
/* Forces the device into and out of the deep power down mode */
/* */
/* Parameters: */
/* irHandle : Socket number ( 0,1,2... ) */
/* 4 LSB - Socket number */
/* irFlags : DEEP_POWER_DOWN forces the low power consumption */
/* mode. otherwise turning to the regular mode */
/* */
/* Returns: None
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -