📄 sst39vf160.h
字号:
#ifndef __SST39VF160_h__
#define __SST39VF160_h__
#include "def.h"
/* Because S3C44B0X is connected to SST39VF160, */
/* the addr parameter has to be a WORD address, so called in AMD specification */
#define MAN_ID (0x00bf)
#define DEV_ID (0x2782)
#define _WR(addr,data) *((U16 *)(addr<<1))=(U16)data /*the addr should be shifted */
#define _RD(addr) *((U16 *)(addr<<1))
#define _RESET() _WR(0x0,0xf0f0)
#define BADDR2WADDR(addr) (addr>>1)
#ifdef __cplusplus
extern "C" {
#endif
/* C does not support default parameters here */
int ProgramSST39VF160(U32 srcAddress,U32 srcOffset,U32 targetAddress,U32 targetSize);
int EraseSST39VF160(U32 startaddr,U32 endaddr);
void SST39VF160_EraseSector(int targetAddr);
void SST39VF160_EraseBlock(int targetAddr);
void SST39VF160_EraseChip(void);
int SST39VF160_CheckId(void);
int SST39VF160_ProgFlash(U32 realAddr,U16 data);
int _WAIT(void);
int BlankCheck(int targetAddr,int targetSize);
#ifdef __cplusplus
}
#endif
#endif /*SST39VF160*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -