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

📄 blockdev.h

📁 M-System DOC(Disk on a Chip) Flash芯片的诊断工具, 可以从Flash芯片中获取特定的数据信息, 用于判断芯片当前的状态.
💻 H
📖 第 1 页 / 共 2 页
字号:
/*        irSectorCount        : Number of sectors actually read        */
/*----------------------------------------------------------------------*/

#define flAbsReadRuggedized(ioreq)  bdCall(FL_ABS_READ_RUGGEDIZED,ioreq)
#endif /* RUGGEDIZED */

#ifndef FL_READ_ONLY
#ifdef WRITE_PROTECTION
#define FL_PROTECT   0
#define FL_UNPROTECT 1
#define FL_UNLOCK    2
#endif /* WRITE_PROTETION */
#endif /* FL_READ_ONLY */
#endif /* ABS_READ_WRITE */

#ifdef FL_LOW_LEVEL

/*----------------------------------------------------------------------*/
/*                          P h y s i c a l I n f o                     */
/*                                                                      */
/* A structure that holds physical information about the media. The     */
/* information includes JEDEC ID, unit size and media size. Pointer     */
/* to this structure is passed to the function flGetPhysicalInfo where  */
/* it receives the relevant data.                                       */
/*                                                                      */
/*----------------------------------------------------------------------*/

typedef struct {
  FLWord type;                 /* Flash device type (JEDEC id)         */
  FLByte         mediaType;    /* type of media see below              */
  FLDword        unitSize;     /* Smallest physically erasable size    */
                               /* (with interleaving taken in account) */
  FLDword        mediaSize;    /* media size in bytes                  */
  FLDword        chipSize;     /* individual chip size in bytes        */
  FLDword        interleaving; /* device interleaving                  */
} PhysicalInfo;

/* media types */
#define FL_NOT_DOC      0
#define FL_DOC          1
#define FL_MDOC         2
#define FL_DOC2000TSOP  3
#define FL_MDOCP_16     4
#define FL_MDOCP        5
#define FL_DOC_OREN     6
#define FL_MDOC512_G3   7
#define FL_MDOC256_P3   8
#define FL_MDOC256_G3   9
#define FL_MDOC128_P3   10
#define FL_AMD_NOR      11
#define FL_SEIJA        12

/* capabilities flags */
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,
   SUPPORT_RUGGED_FILE_SYSTEM         = 14
}FLCapability;

#endif /* FL_LOW_LEVEL */

#ifdef ENVIRONMENT_VARS

/*----------------------------------------------------------------------*/
/*                   f l S e t E n v V o l u m e                        */
/*                                                                      */
/* Change one of TrueFFS environment variables for a specific partition */
/*                                                                      */
/* Note : This routine is used by all other flSetEnv routines.          */
/*        In order to effect variables that are common to several       */
/*        sockets or volumes use INVALID_VOLUME_NUMBER                  */
/*                                                                      */
/* Parameters:                                                          */
/*      variableType    : variable type to cahnge                       */
/*      socket          : Associated socket                             */
/*      volume          : Associated volume (partition)                 */
/*      value           : varaible value                                */
/*                                                                      */
/* Note: Variables common to all sockets must be addressed using socket */
/*       0 and volume 0.                                                */
/*                                                                      */
/* Returns:                                                             */
/*      FLStatus        : 0 on success, otherwise failed                */
/*      prevValue       : The previous value of the variable            */
/*----------------------------------------------------------------------*/

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
TFFS_DLL_API FLStatus NAMING_CONVENTION flSetEnvVolume(FLEnvVars variableType ,
                  FLByte  socket,FLByte  volume ,
                  FLDword value, FLDword FAR2 *prevValue);
#ifdef __cplusplus
}
#endif /* __cplusplus */

/*----------------------------------------------------------------------*/
/*                       f l S e t E n v S o c k e t                    */
/*                                                                      */
/* Change one of TrueFFS environment variables for a specific sockets.  */
/*                                                                      */
/* Parameters:                                                          */
/*      variableType    : variable type to cahnge                       */
/*      socket          : socket number                                 */
/*      value           : varaible value                                */
/*                                                                      */
/* Returns:                                                             */
/*      FLStatus        : 0 on success, otherwise failed                */
/*      prevValue       : The previous value of the variable            */
/*                        if there are more then 1 partition in that    */
/*                        socket , the first partition value is returned*/
/*----------------------------------------------------------------------*/

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
TFFS_DLL_API FLStatus NAMING_CONVENTION flSetEnvSocket(FLEnvVars variableType , FLByte  socket ,
                        FLDword value, FLDword FAR2 *prevValue);
#ifdef __cplusplus
}
#endif /* __cplusplus */

/*----------------------------------------------------------------------*/
/*                       f l S e t E n v All                            */
/*                                                                      */
/* Change one of TrueFFS environment variables for all systems, sockets */
/* and partitions.                                                      */
/*                                                                      */
/* Parameters:                                                          */
/*      variableType    : variable type to cahnge                       */
/*      value           : varaible value                                */
/*                                                                      */
/* Returns:                                                             */
/*      FLStatus        : 0 on success, otherwise failed                */
/*      prevValue       : The previous value of the variable            */
/*----------------------------------------------------------------------*/

#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
TFFS_DLL_API FLStatus NAMING_CONVENTION flSetEnvAll(FLEnvVars variableType , FLDword value, FLDword FAR2 *prevValue);
#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* ENVIRONMENT_VARS */

#endif /* BLOCKDEV_H */

⌨️ 快捷键说明

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