header.h

来自「nand flash模拟驱动」· C头文件 代码 · 共 42 行

H
42
字号
#ifndef W90P71_EBI_H_
#define W90P71_EBI_H_

#endif /*W90P71_EBI_H_*/

#define GETBIT(REG,N)			(REG&(1<<N))
#define SETBIT(REG,N)			REG=REG|(1<<N)
#define CLRBIT(REG,N)			REG=REG&(~(1<<N))



#define EBICON			(*(volatile unsigned long *)(0xFFF01000))
	#define EXBE0		24
#define ROMCON			(*(volatile unsigned long *)(0xFFF01004))
#define SDCONF0		(*(volatile unsigned long *)(0xFFF01008))
#define SDCONF1		(*(volatile unsigned long *)(0xFFF0100C))
#define SDTIME0		(*(volatile unsigned long *)(0xFFF01010))
#define SDTIME1		(*(volatile unsigned long *)(0xFFF01014))
#define EXT0CON		(*(volatile unsigned long *)(0xFFF01018))
	#define BASADDR	19
	#define SIZE		16
	#define ADRS		15
	#define tACC		11
	#define tCOH		8
	#define tACS		5
	#define tCOS		2
	#define DBWD		0
#define EXT1CON		(*(volatile unsigned long *)(0xFFF0101C))
#define EXT2CON		(*(volatile unsigned long *)(0xFFF01020))
#define EXT3CON		(*(volatile unsigned long *)(0xFFF01024))
#define CKSKEW			(*(volatile unsigned long *)(0xFFF01F00))


#define CMDLATCH		(*(volatile unsigned char *)(0x4000002))			//命令锁存
#define ADRLATCH		(*(volatile unsigned char *)(0x4000001))			//地址锁存
#define READIO			(*(volatile unsigned char *)(0x4000000))			//读取IO值

#define GPIO_CFG4		(*(volatile unsigned long *)(0xFFF83040))
#define GPIO_DIR4		(*(volatile unsigned long *)(0xFFF83044))
#define GPIO_DATAIN4	(*(volatile unsigned long *)(0xFFF8304c))
#define NANDRB			GETBIT(GPIO_DATAIN4,10)

⌨️ 快捷键说明

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