?? device.h
字號:
/*
* define client compile flags
*/
/* TRUE means client will implement this function external to the template */
#define CLIENT_GET_FPTR TRUE
/* little endian */
#define BIG_ENDIAN_ARCHITECTURE FALSE
/* set 1 and Only 1 configuration to TRUE */
#define X_8 FALSE
#define PX_16 FALSE
#define X_16 TRUE
#define X_32 FALSE
#define ILX_32 FALSE
/* set 1 and only 1 size to TRUE */
#define C3_8_M FALSE
#define C3_16_M TRUE
#define C3_32_M FALSE
/* set 1 and only 1 layout to TRUE */
#define TOP_BOOT FALSE
#define BOT_BOOT TRUE
/* _ERASE_TIMEOUT = # of times to check for status ready after erase
commands are issued to the device. This value is effectively CPU
dependent and should be modified accordingly for the appropriate platform. */
#define TMPL_ERASE_TIMEOUT 2000000L
/* _PROGRAM_TIMEOUT = # of times to check for status ready after
program commands are issued to the device This value is effectively CPU
dependent and should be modified accordingly for the appropriate platform. */
#define TMPL_PROGRAM_TIMEOUT 1000000L
#define TMPL_BLOCKSTAT_UNLOCKED 0x0
#define TMPL_BLOCKSTAT_LOCKED 0x1
#define TMPL_BLOCKSTAT_LOCKEDDOWN 0x3
#define TMPL_PROTECTION_LOCK_LOCATION 0x0
/******************** 8M *********************/
#if C3_8_M
#define TMPL_TOTAL_NUMBLOCKS 23
#define TMPL_TOTAL_SIZE 1048576 /* bytes */
#if TOP_BOOT /* establish configuration for both C3 block sets */
#define TMPL_SET1_NUMBLOCKS 15
#define TMPL_SET1_NUMBYTES 65536 /* bytes per block */
#define TMPL_SET1_SIZE 983040 /* bytes */
#define TMPL_SET2_NUMBLOCKS 8
#define TMPL_SET2_NUMBYTES 8192 /* bytes per block */
#endif /* TOP_BOOT */
#if BOT_BOOT /* establish configuration for both C3 block sets */
#define TMPL_SET1_NUMBLOCKS 8
#define TMPL_SET1_NUMBYTES 8192 /* bytes per block */
#define TMPL_SET1_SIZE 65536 /* bytes */
#define TMPL_SET2_NUMBLOCKS 15
#define TMPL_SET2_NUMBYTES 65536 /* bytes per block */
#endif /* BOT_BOOT */
#endif /* C3_8_M */
/******************** 16M *********************/
#if C3_16_M
#define TMPL_TOTAL_NUMBLOCKS 39
#define TMPL_TOTAL_SIZE 2097152 /* bytes */
#if TOP_BOOT /* establish configuration for both C3 block sets */
#define TMPL_SET1_NUMBLOCKS 31
#define TMPL_SET1_NUMBYTES 65536 /* bytes per block */
#define TMPL_SET1_SIZE 2031616 /* bytes */
#define TMPL_SET2_NUMBLOCKS 8
#define TMPL_SET2_NUMBYTES 8192 /* bytes per lock */
#endif /* TOP_BOOT */
#if BOT_BOOT /* establish configuration for both C3 block sets */
#define TMPL_SET1_NUMBLOCKS 8
#define TMPL_SET1_NUMBYTES 8192 /* bytes per block */
#define TMPL_SET1_SIZE 65536 /* bytes */
#define TMPL_SET2_NUMBLOCKS 31
#define TMPL_SET2_NUMBYTES 65536 /* bytes per block */
#endif /* BOT_BOOT */
#endif /* C3_16_M */
/******************** 32M *********************/
#if C3_32_M
#define TMPL_TOTAL_NUMBLOCKS 71
#define TMPL_TOTAL_SIZE 4194304 /* bytes */
#if TOP_BOOT /* establish configuration for both C3 block sets */
#define TMPL_SET1_NUMBLOCKS 63
#define TMPL_SET1_NUMBYTES 65536 /* bytes per block */
#define TMPL_SET1_SIZE 4128768 /* bytes */
#define TMPL_SET2_NUMBLOCKS 8
#define TMPL_SET2_NUMBYTES 8192 /* bytes per block */
#endif /* TOP_BOOT */
#if BOT_BOOT /* establish configuration for both C3 block sets */
#define TMPL_SET1_NUMBLOCKS 8
#define TMPL_SET1_NUMBYTES 8192 /* bytes per block */
#define TMPL_SET1_SIZE 65536 /* bytes */
#define TMPL_SET2_NUMBLOCKS 63
#define TMPL_SET2_NUMBYTES 65536 /* bytes per block */
#endif /* BOT_BOOT */
#endif /* C3_32_M */
#if X_8
#define TMPL_OTP_NUMWORDS 0x9
#define TMPL_OTP_BASE 0x100 /* address */
#define TMPL_OTP_PROGRAM 0xC0
#define TMPL_OTP_READ 0x90
#define TMPL_OTP_LOCK 0xFD
#define TMPL_LOCK_BIT_SET 0x01
#define TMPL_LOCKDOWN_BIT_SET 0x2F
#define TMPL_LOCK_BIT_CLEAR 0xD0
#define TMPL_BLOCK_SUSPEND 0xB0
#define TMPL_BLOCK_RESUME 0xD0
#endif /* X_8 */
#if PX_16
#define TMPL_OTP_NUMWORDS 0x9
#define TMPL_OTP_BASE 0x100 /* address */
#define TMPL_OTP_PROGRAM 0xC0C0
#define TMPL_OTP_READ 0x9090
#define TMPL_OTP_LOCK 0xFDFD
#define TMPL_LOCK_BIT_SET 0x0101
#define TMPL_LOCKDOWN_BIT_SET 0x2F2F
#define TMPL_LOCK_BIT_CLEAR 0xD0D0
#define TMPL_BLOCK_SUSPEND 0xB0B0
#define TMPL_BLOCK_RESUME 0xD0D0
#endif /* PX_16 */
#if X_16
#define TMPL_OTP_NUMWORDS 0x9
#define TMPL_OTP_BASE 0x100 /* address */
#define TMPL_OTP_PROGRAM 0x00C0
#define TMPL_OTP_READ 0x0090
#define TMPL_OTP_LOCK 0xFFFD
#define TMPL_LOCK_BIT_SET 0x0001
#define TMPL_LOCKDOWN_BIT_SET 0x002F
#define TMPL_LOCK_BIT_CLEAR 0x00D0
#define TMPL_BLOCK_SUSPEND 0x00B0
#define TMPL_BLOCK_RESUME 0x00D0
#endif /* X_16 */
#if X_32
#define TMPL_OTP_NUMWORDS 0x9
#define TMPL_OTP_BASE 0x200 /* address */
#define TMPL_OTP_PROGRAM 0x00C000C0
#define TMPL_OTP_READ 0x00900090
#define TMPL_OTP_LOCK 0xFFFDFFFD
#define TMPL_LOCK_BIT_SET 0x00010001
#define TMPL_LOCKDOWN_BIT_SET 0x002F002F
#define TMPL_LOCK_BIT_CLEAR 0x00D000D0
#define TMPL_BLOCK_SUSPEND 0x00B000B0
#define TMPL_BLOCK_RESUME 0x00D000D0
#endif /* X_32 */
#if ILX_32
#define TMPL_OTP_NUMWORDS 0x9
#define TMPL_OTP_BASE 0x200 /* address */
#define TMPL_OTP_PROGRAM 0x00C000C0
#define TMPL_OTP_READ 0x00900090
#define TMPL_OTP_LOCK 0x00FD00FD
#define TMPL_LOCK_BIT_SET 0x00010001
#define TMPL_LOCK_BIT_CLEAR 0x00D000D0
#define TMPL_LOCKDOWN_BIT_SET 0x002F002F
#define TMPL_BLOCK_SUSPEND 0x00B000B0
#define TMPL_BLOCK_RESUME 0x00D000D0
#endif /* ILX_32 */
/*
* device specific typedefs
*/
/* extended query structure */
typedef struct TMPL_ExtQueryData {
char ExtQueryStr[4]; /* 3 bytes + null */
UINT8 MajorVersionNum; /* 1 byte */
UINT8 MinorVersionNum; /* 1 bytes */
UINT32 OptionalFeature; /* 4 bytes */
UINT8 AfterSuspendFunctions; /* 1 byte */
UINT16 BlockLockStatus; /* 2 bytes */
UINT8 VccOptimum; /* 1 byte */
UINT8 VppOptimum; /* 1 byte */
}TMPL_extquery;
#endif /* __DEVICE_H */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -