flashmem.h

来自「miceteck_MPC860_BSP源码,基于VXWORK」· C头文件 代码 · 共 68 行

H
68
字号
/* flash.h - header for 29LV160T FLASH memory devices */

/*
DESCRIPTION
This file contains header information for 29LV160T FLASH memory devices.
*/

#ifndef __INCflashMem
#define __INCflashMem

#ifdef __cplusplus
extern "C" {
#endif

#ifdef	_ASMLANGUAGE
#define CAST_CH
#else	/* _ASMLANGUAGE */
#define CAST_CH (char *)
#endif	/* _ASMLANGUAGE */


#ifndef FLASH29_REG_ADRS
#define FLASH29_REG_ADRS(reg) (CAST_CH FLASH_ADRS + reg )
#endif  /* FLASH29_REG_ADRS */


/* FLASH29 command register addresses */

#define FLASH29_REG_FIRST_CYCLE		FLASH29_REG_ADRS (0xaaa)
#define FLASH29_REG_SECOND_CYCLE	FLASH29_REG_ADRS (0x555)

/* define erase type */
#define CHIP_ERASE             0x01
#define SECTOR_ERASE           0x02

/* FLASH29 command definitions */

#define	FLASH29_CMD_FIRST		 0xaa
#define	FLASH29_CMD_SECOND		 0x55
#define	FLASH29_CMD_FOURTH		 0xaa
#define	FLASH29_CMD_FIFTH		 0x55
#define	FLASH29_CMD_SIXTH		 0x10
#define	FLASH29_CMD_SECTOR		 0x30

#define	FLASH29_CMD_PROGRAM		 0xa0
#define	FLASH29_CMD_CHIP_ERASE		 0x80
#define	FLASH29_CMD_READ_RESET		 0xf0
#define	FLASH29_CMD_AUTOSELECT		 0x90
#define FLASH29_CMD_UNLOCK_BYPASS_PROG   0xA0
#define FLASH29_CMD_UNLOCK_BYPASS        0x20
#define FLASH29_CMD_UNLOCK_BYPASS_RESET  0x00
 
#define	FLASH_29LV160T			0xC4	/* device code 29F010 */


/* Export functions */
/*
extern void	sysFlashDelay (int delayCount);
extern STATUS	sysFlashDataPoll (volatile UINT8 * pFA, UINT8 value,int pollSize);
extern STATUS	sysFlashErase (UINT8 eraseType,volatile UINT8* pFA,int sectorSize   );
extern STATUS	sysFlashWrite (UINT8 * pFB, int size, int offset);
*/
#ifdef __cplusplus
}
#endif

#endif /* __INCflashMem */

⌨️ 快捷键说明

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