⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 at91_nand.h

📁 at91rm9200的256M bytes Nand flash的Ads12测试代码
💻 H
字号:
/* * AT91RM9200 specific NAND (SmartMedia) defines * * (c) 2003 Rick Bronson * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */#ifndef __AT91_NAND_H#define __AT91_NAND_H#include "types.h"#define AT91_SMART_MEDIA_ALE (1 << 22)  /* our ALE is AD22 */#define AT91_SMART_MEDIA_CLE (1 << 21)  /* our CLE is AD21 *//* * NAND Flash Manufacturer ID Codes */#define NAND_MFR_TOSHIBA	0x98#define NAND_MFR_SAMSUNG	0xec#define NAND_MFR_FUJITSU	0x04#define NAND_MFR_NATIONAL	0x8f/* * NAND Flash Device ID Structure * * Structure overview: * *  name - Identify the device type * *  id -  device ID code * *  chipshift - total number of address bits for the device which *              is used to calculate address offsets and the total *              number of bytes the device is capable of. * *  page256 - denotes if flash device has 256 byte pages or not. * *  pageadrlen - number of bytes minus one needed to hold the *               complete address into the flash array. Keep in *               mind that when a read or write is done to a *               specific address, the address is input serially *               8 bits at a time. This structure member is used *               by the read/write routines as a loop index for *               shifting the address out 8 bits at a time. * *  erasesize - size of an erase block in the flash device. */struct nand_flash_dev {	char * name;	int id;	int chipshift;	unsigned long erasesize;	char page256;};/* * NAND Flash Manufacturer ID Structure * *  name - Manufacturer name * *  id - manufacturer ID code of device.*/struct nand_manufacturers {	int id;	char * name;};/** Constants for oob configuration*/#define NAND_BADBLOCK_POS		5#define NAND_NONE_OOB			0#define NAND_JFFS2_OOB			1#define NAND_YAFFS_OOB			2#define NAND_NOOB_ECCPOS0		0#define NAND_NOOB_ECCPOS1		1#define NAND_NOOB_ECCPOS2		2#define NAND_NOOB_ECCPOS3		3#define NAND_NOOB_ECCPOS4		6#define NAND_NOOB_ECCPOS5		7#define NAND_JFFS2_OOB_ECCPOS0		0#define NAND_JFFS2_OOB_ECCPOS1		1#define NAND_JFFS2_OOB_ECCPOS2		2#define NAND_JFFS2_OOB_ECCPOS3		3#define NAND_JFFS2_OOB_ECCPOS4		6#define NAND_JFFS2_OOB_ECCPOS5		7#define NAND_YAFFS_OOB_ECCPOS0		8#define NAND_YAFFS_OOB_ECCPOS1		9#define NAND_YAFFS_OOB_ECCPOS2		10#define NAND_YAFFS_OOB_ECCPOS3		13#define NAND_YAFFS_OOB_ECCPOS4		14#define NAND_YAFFS_OOB_ECCPOS5		15#define NAND_JFFS2_OOB8_FSDAPOS		6#define NAND_JFFS2_OOB16_FSDAPOS	8#define NAND_JFFS2_OOB8_FSDALEN		2#define NAND_JFFS2_OOB16_FSDALEN	8#endif

⌨️ 快捷键说明

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