flash.h.svn-base

来自「lwip协议在arm7+uCos系统上的移植」· SVN-BASE 代码 · 共 26 行

SVN-BASE
26
字号
/***************************************************************************
  文件名称:flash.h
  版本号:	1.0
  日期:	2005-12-16
  说明:	对flash的操作头文件(目前只针对SST32VF/LF160)且CPU位宽16位flash
  			的起始地址为0
  调用列表:--
  修改历史:--
*****************************************************************************/
#ifndef _FLASH_H_
#define _FLASH_H_
//the erase type
#define ENTIRE	1
#define BLOCK	2
#define SECTOR	3
//write and read the flash,the addr is the address on the view of the Flash not the ARM  
#define WriteFlash(addr,dat) *((volatile unsigned short int*)(addr<<1)) = (unsigned short)dat
#define ReadFlash(addr) *((volatile unsigned short int*)(addr<<1))



int EraserFlash(int type, unsigned int address);
int WriteFH(unsigned int address, unsigned short data);
void ReadFID(unsigned short* MID, unsigned short* DID); 

#endif //_FLASH_H_

⌨️ 快捷键说明

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