?? common.h
字號:
#define BASE_ADDRESS 0x0
#define BASE_ADDRESS2 0x800000
#define uchar unsigned char
#define uint unsigned int
#define ushort unsigned short
#define ulong unsigned long
#define READ_STATUS (ushort)0x70
#define PROGRAM_CMD (ushort)0x40
#define ERASE_CONFIRM (ushort)0xD0
#define ERASE_ALL_CMD (ushort)0x30
#define ERASE_SEC_CMD (ushort)0x20
#define ID_CMD (ushort)0x90
#define STATUS_CLEAR (ushort)0x50
#define STATUS_WSMS (ushort)0x80
#define STATUS_ERASE (ushort)0x20
#define STATUS_PROG (ushort)0x10
#define UNLOCK_SETUP (ushort)0x60
#define UNLOCK_CONFIRM (ushort)0xD0
#define PCRC_CMD (ushort)0x04
#define RESET_CMD (ulong)0xff
#define FPROGRAM 0
#define FERASEALL 1
#define FERASESEC 2
#define FREADID 3
#define BUFFER_SIZE 0x100000
typedef struct {
ulong Command;
ulong Result;
ulong Reserved1[4];
ulong Reserved2;
ulong TargetAddr;
ulong Length;
ulong Reserved3;
ulong Reserved4;
ulong Reserved5;
ulong Reserved6;
ulong Reserved7;
ulong Reserved8;
uchar Buf[BUFFER_SIZE];
} FLASH_INFO;
// flash.c
extern void Program(void);
extern void EraseAll(void);
extern void EraseSector(void);
extern void ReadChipID(void);
extern void ClearBlockLock(ulong targetAddr);
extern void ClearAllBlockLock(void);
extern int BlankCheck(ulong targetAddr,ulong targetSize);
extern int Verification(ulong targetAddr, ulong limit, ulong srcAddr);
extern int OneSectorErase(ulong targetAddr);
extern void Main(void);
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -