flash.h

来自「很好的MP3程序。包括控制台程序」· C头文件 代码 · 共 41 行

H
41
字号
#ifndef __FLASH_H#define __FLASH_H#define ROM_BASE				0x00000000#define DRAM_BASE             	0x0c000000#define SRAM_BASE             	0x00000000#define DEVICE_TYPE_X8	(8 / 8)#define DEVICE_TYPE_X16	(16 / 8)#define DEVICE_TYPE_X32	(32 / 8) /* Manufacturers *//* SST */#define MANUFACTURER_SST                0x00BF#define SST39VF040                      0x00D7#define SST39VF080                      0x00D8#define SST39VF016                      0x00D9#define SST39VF160                      0x2782  #define D6_MASK	                        0x40#define D7_MASK	                        0x80#define NOCACHE_BIT                     0x00000000#define SECTOR_SIZE						0x1000#define SECTOR_ADR_MASK					(~(SECTOR_SIZE-1))void send_cmd(unsigned long addr,unsigned char cmd);void send_unlock();int probe_chip();int flash_is_busy(unsigned long addr);int flash_erase();int flash_read(unsigned long from,unsigned long len,unsigned short *buf);int write_one_word(unsigned long addr, unsigned short dat);int flash_write(unsigned long to,unsigned long len,unsigned short *buf);int flash_init();#endif /* __FLASH_H */

⌨️ 快捷键说明

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