📄 blockdev.h
字号:
* bits 7-4 - Partition # (zero based)
* bits 3-0 - Socket # (zero based)
* 'irData' - bdkParams record
* length - number of blocks to create
* oldSign - signature of the sub-partition
* newSign - the replacing signature
*
* Return: flOK - success
* flBadLength - buffer length > Erasable Block Size
* flWriteFault - fail in buffer writing
* flNoSpaceInVolume - end of media was prematurely reached
*-------------------------------------------------------------------*/
#define bdkCreate(ioreq) bdCall(FL_BINARY_CREATE,ioreq)
/*----------------------------------------------------------------------*/
/* b d k P a r t i t i o n I n f o */
/* */
/* Parameters: */
/* irHandle : volume number */
/* irData : pointer to structure that hold socket */
/* parameters */
/* irLength : Physical size of the binary volume */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed. */
/*----------------------------------------------------------------------*/
#define bdkPartitionInfo(ioreq) bdCall(FL_BINARY_PARTITION_INFO,ioreq)
/* DEEP_POWER_DOWN 1 defined in flflash.h */
/*----------------------------------------------------------------------*/
/* f l W r i t e I P L */
/* */
/* Place a user buffer to both copies of the IPL area */
/* */
/* Note : This routine is applicable only to docPlus family devices */
/* Doc2000 family devices will return flFeatureNotSupported */
/* */
/* Parameters: */
/* irHandle : Socket number (0,1,..) */
/* 4 LSB - Socket number */
/* irData : Pointer to user buffer */
/* irLength : Size of the buffer */
/* irFlags : See flags bellow */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flWriteIPL(ioreq) bdCall(FL_WRITE_IPL,ioreq)
/*----------------------------------------------------------------------*/
/* r e a d I P L */
/* */
/* Read IPL to user buffer. */
/* */
/* Note : Read length must be a multiplication of 512 bytes */
/* Note : Causes DiskOnChip Millennium Plus to download (i,e protection */
/* key will be removed from all partitions. */
/* */
/* Parameters: */
/* irHandle : Socket number (0,1,..) */
/* 4 LSB - Socket number */
/* irData : Pointer to user buffer */
/* irLength : Size of the buffer */
/* irCount : Used IPL size on the media */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flReadIPL(ioreq) bdCall(FL_READ_IPL,ioreq)
/*----------------------------------------------------------------------*/
/* f l I n i t */
/* */
/* Initializes the FLite system. */
/* */
/* Calling this function is optional. If it is not called, */
/* initialization will be done automatically on the first FLite call. */
/* This function is provided for those applications who want to */
/* explicitly initialize the system and get an initialization status. */
/* */
/* Calling flInit after initialization was done has no effect. */
/* */
/* Parameters: */
/* None */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
TFFS_DLL_API FLStatus NAMING_CONVENTION flInit(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
/*----------------------------------------------------------------------*/
/* f l E x i t */
/* */
/* If the application ever exits, flExit should be called before exit. */
/* flExit flushes all buffers, closes all open files, powers down the */
/* sockets and removes the interval timer. */
/* */
/* Parameters: */
/* None */
/* */
/* Returns: */
/* Nothing */
/*----------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
TFFS_DLL_API void NAMING_CONVENTION flExit(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
/*----------------------------------------------------------------------*/
/* f l G e t P h y s i c a l I n f o */
/* */
/* Get physical information of the media. The information includes */
/* JEDEC ID, unit size and media size. */
/* */
/* Parameters: */
/* irHandle : Socket number (0,1,..) */
/* irData : Address of user buffer to read physical */
/* information into. */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/* irLength : Window base address. note mast be cast to */
/* unsigned. */
/*----------------------------------------------------------------------*/
#define flGetPhysicalInfo(ioreq) bdCall(FL_GET_PHYSICAL_INFO, ioreq)
/*----------------------------------------------------------------------*/
/* f l E x t e n d e d G e t D i s k I n f o */
/* */
/* Returns general information about the Device and a specific partition */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Must be set to 0 */
/* bits 3-0 - Socket # (zero based) */
/* irCount : Partition number */
/* irFlags : Either FL_BDK_PARTITION or FL_DISK_PARTITION */
/* irData : Address of FLExtendedDiskInfo structure */
/* irLength : Floor number to access - FL_ALL_FLOORS */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#define flGetExtendedDiskInfo(ioreq) bdCall(FL_GET_EXTENDED_DISK_INFO,ioreq)
/*----------------------------------------------------------------------*/
/* f l I d e n t i f y P r o t e c t i o n */
/* b d k I d e n t i f y P r o t e c t i o n */
/* f l I p l I d e n t i f y P r o t e c t i o n */
/* */
/* Returns the specified partitions protection attributes */
/* */
/* 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 */
/* irFlags CHANGEABLE_PROTECTION - changeable protection type */
/* PROTECTABLE - partition can recieve protection */
/* READ_PROTECTED - partition is read protected */
/* WRITE_PROTECTED - partition is write protected */
/* LOCK_ENABLED - HW lock signal is enabled */
/* LOCK_ASSERTED - HW lock signal is asserted */
/* KEY_INSERTED - key is inserted (not currently */
/* protected. */
/*----------------------------------------------------------------------*/
#define flIdentifyProtection(ioreq) bdCall(FL_PROTECTION_GET_TYPE,ioreq)
#define bdkIdentifyProtection(ioreq) bdCall(FL_BINARY_PROTECTION_GET_TYPE,ioreq)
#define flIplIdentifyProtection(ioreq) bdCall(FL_IPL_PROTECTION_GET_TYPE,ioreq)
/*----------------------------------------------------------------------*/
/* f l I n s e r t P r o t e c t i o n K e y */
/* b d k I n s e r t P r o t e c t i o n K e y */
/* f l I p l I n s e r t P r o t e c t i o n K e y */
/* */
/* Insert the protection key in order to remove the protection of the */
/* partititon specified by the drive handle */
/* */
/* Parameters: */
/* irHandle : Drive number (0, 1, ...) */
/* bits 7-4 - Partition # (zero based) */
/* bits 3-0 - Socket # (zero based) */
/* irData : pointer to an 8 bytes key array */
/* */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -