📄 ex_norflash.h
字号:
/*****************************************************************************
* ex_norflash.h: Header file for NXP LPC23xx/24xx Family Microprocessors
*
* Copyright(C) 2006, NXP Semiconductor
* All rights reserved.
*
* History
* 2007.01.10 ver 1.00 Prelimnary version, first Release
*
******************************************************************************/
#ifndef __EX_NORFLASH_H
#define __EX_NORFLASH_H
/*****************************************************************************
* Defines and typedefs
****************************************************************************/
#define NOR_FLASH_BASE 0x80000000
#define NOR_FLASH_SIZE 0x00100000 // 1M个单元,每单元16bit
#define GET_ADDR(addr) (volatile WORD *)(NOR_FLASH_BASE | (addr<<1))
#define SECTOR_SIZE 0x10000 // 0~30组大小统一为64KB
#define SECTOR_NUM 30 // 实际上一直到34,但后几个组的大小分别为16、4、4、8K字,大小不统一
//#define SST_ID 0xBF /* SST Manufacturer's ID code */
//#define SST_39VF160 0x234B /* SST 39VF160 device code */
#define MANUFACTURER_ID 0x01 /* AM29LV160DB Manufacturer's ID code */
#define DEVICE_ID 0x2249 /* AM29LV160DB device code */
#define PROGRAM_TIMEOUT 0x00000080
extern void NORFLASHInit( void );
extern void NORFLASHErase( void );
extern DWORD NORFLASHCheckID( void );
extern DWORD NORFLASHWriteWord( DWORD Addr, WORD Data );
extern DWORD ToggleBitCheck( DWORD Addr, WORD Data );
void NORFLASHSectorErase(BYTE sector);
#endif /* end __EX_NORFLASH_H */
/*****************************************************************************
** End Of File
******************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -