📄 blockdev.h
字号:
/*----------------------------------------------------------------------*/
/* 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 {
unsigned short type; /* Flash device type (JEDEC id) */
char mediaType; /* type of media see below */
long int unitSize; /* Smallest physically erasable size
(with interleaving taken in account) */
long int mediaSize; /* media size in bytes */
long int chipSize; /* individual chip size in bytes */
int 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
/* 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
}FLCapability;
#endif /* FL_LOW_LEVEL */
#ifdef ENVIRONMENT_VARS
typedef enum { /* Variable type code for flSetEnv routin */
FL_ENV_VARS_PER_SYSTEM = 0,
FL_IS_RAM_CHECK_ENABLED = 1,
FL_TL_CACHE_ENABLED = 2,
FL_DOC_8BIT_ACCESS = 3,
FL_MULTI_DOC_ENABLED = 4,
FL_SET_MAX_CHAIN = 5,
FL_MARK_DELETE_ON_FLASH = 6,
FL_MTL_POLICY = 7,
FL_SECTORS_VERIFIED_PER_FOLDING = 8,
FL_SUSPEND_MODE = 9,
FL_ENV_VARS_PER_SOCKET = 100,
FL_VERIFY_WRITE_OTHER = 101,
FL_MTD_BUS_ACCESS_TYPE = 102,
FL_ENV_VARS_PER_VOLUME = 200,
FL_SET_POLICY = 201,
FL_VERIFY_WRITE_BDTL = 202,
FL_VERIFY_WRITE_BINARY = 203
} FLEnvVars;
/*----------------------------------------------------------------------*/
/* 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 al 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 */
FLStatus NAMING_CONVENTION flSetEnvVolume(FLEnvVars variableType ,
byte socket,byte volume ,
dword value, dword 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 */
FLStatus NAMING_CONVENTION flSetEnvSocket(FLEnvVars variableType , byte socket ,
dword value, dword 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 */
FLStatus NAMING_CONVENTION flSetEnvAll(FLEnvVars variableType , dword value, dword FAR2 *prevValue);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ENVIRONMENT_VARS */
#ifndef FL_NO_USE_FUNC
/*----------------------------------------------------------------------*/
/* f l S e t D o c B u s R o u t i n e */
/* */
/* Set user defined memory acces routines for DiskOnChip. */
/* */
/* Parameters: */
/* socket : Socket number to install routine for. */
/* structPtr : Pointer to function structure. */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
FLStatus NAMING_CONVENTION flSetDocBusRoutine(byte socket, FLAccessStruct FAR1 * structPtr);
#ifdef __cplusplus
}
#endif /* __cplusplus */
/*----------------------------------------------------------------------*/
/* f l G e t D o c B u s R o u t i n e */
/* */
/* Get currently installed memory access routines for DiskOnChip. */
/* */
/* Parameters: */
/* socket : Socket number to install routine for. */
/* structPtr : Pointer to function structure. */
/* */
/* Returns: */
/* FLStatus : 0 on success, otherwise failed */
/*----------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
FLStatus NAMING_CONVENTION flGetDocBusRoutine(byte socket, FLAccessStruct FAR1 * structPtr);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* FL_NO_USE_FUNC */
#endif /* BLOCKDEV_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -