📄 nand.h
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Module Name: sdnand.h
Abstract: FLASH Media Driver Interface Samsung K9F2808UOB NAND Flash Chip
Notes: This files contains the port address, command definitions for
K9F2808UOB chip on Hornet developement board.
-----------------------------------------------------------------------------*/
#ifndef _SDNAND_
#define _SDNAND_
// Port Address
#define NAND_CMD_PORT (IoAddr)
#define NAND_ADDR_PORT (IoAddr+2)
#define NAND_DATA_PORT (IoAddr+6)
#define NAND_BUSY_PORT (IoAddr+8)
#define NAND_CS_PORT (IoAddr+0xc)
// Flash Chip Capability
#define NUM_BLOCKS 1024
#define SECTOR_SIZE 512
#define SPARE_SIZE 16
// NAND Flash Command. This appears to be generic across all NAND flash chips
#define CMD_READ 0x00 // Read
#define CMD_READ1 0x01 // Read1
#define CMD_READ2 0x50 // Read2
#define CMD_READID 0x90 // ReadID
#define CMD_READID2 0x91 // Read extended ID
#define CMD_WRITE 0x80 // Write phase 1
#define CMD_WRITE2 0x10 // Write phase 2
#define CMD_ERASE 0x60 // Erase phase 1
#define CMD_ERASE2 0xd0 // Erase phase 2
#define CMD_STATUS 0x70 // Status read
#define CMD_RESET 0xff // Reset
// Status bit pattern
#define STATUS_READY 0x40 // Ready
#define STATUS_ERROR 0x01 // Error
#endif _SDNAND_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -