?? efd_cmd.h
字號:
/* ###########################################################################
### Intel Confidential
### Copyright (c) Intel Corporation 2007
### All Rights Reserved.
### ----------------------------------------------------------------------
### Project: Intel Flash Driver
###
### Module: efd_cmd.h - Device Commands
###
### $Archive: $
### $Revision: $
### $Date: $
###
### $NoKeywords: $
##############################################################################
###
### NOTICE OF LICENSE AGREEMENT
###
### This code is provided by Intel Corp., and the use is governed
### under the terms of a license agreement. See license agreement
### for complete terms of license.
###
### YOU MAY ONLY USE THE SOFTWARE SUBJECT TO THE TERMS OF THE
### INTEL SOFTWARE LICENSE AGREEMENT.
###
########################################################################### */
#ifndef _EFD_CMD_H_
#define _EFD_CMD_H_
#if defined(USED_CONFIGURATION) && (USED_CONFIGURATION == _8BIT_1_X8_)
typedef UINT8 FLASHDATA;
#define NUMBER_OF_DEVICE 1
#define HEX "02X"
#define CMD(A) (A)
#elif defined(USED_CONFIGURATION) && (USED_CONFIGURATION == _16BIT_1_X16_)
typedef UINT16 FLASHDATA;
#define NUMBER_OF_DEVICE 1
#define HEX "04X"
#define CMD(A) (A)
#elif defined(USED_CONFIGURATION) && (USED_CONFIGURATION == _16BIT_2_X8_)
typedef UINT16 FLASHDATA;
#define NUMBER_OF_DEVICE 2
#define HEX "04X"
#define CMD(A) ((A)+((A)<<8))
#elif defined(USED_CONFIGURATION) && (USED_CONFIGURATION == _32BIT_1_X32_)
typedef UINT32 FLASHDATA;
#define NUMBER_OF_DEVICE 1
#define HEX "08X"
#define CMD(A) (A)
#elif defined(USED_CONFIGURATION) && (USED_CONFIGURATION == _32BIT_2_X16_)
typedef UINT32 FLASHDATA;
#define NUMBER_OF_DEVICE 2
#define HEX "08X"
#define CMD(A) ((A)+((A)<<16))
#elif defined(USED_CONFIGURATION) && (USED_CONFIGURATION == _32BIT_4_X8_)
typedef UINT32 FLASHDATA;
#define NUMBER_OF_DEVICE 4
#define HEX "08X"
#define CMD(A) ((A)+((A)<<8)+((A)<<16)+((A)<<24))
#else
#error "Undefined USED_CONFIGURATION"
#endif
/*
Hardware Commands
*/
#define CMD_READ_ARRAY 0xFF
#define CMD_READ_STATUS 0x70
#define CMD_READ_ID 0x90
#define CMD_READ_CFI 0x98
#define CMD_CLEAR_STATUS 0x50
#define CMD_PROGRAM 0x40
#define CMD_BUFFER_PROGRAM 0xE8
#define CMD_BUFFER_CONFIRM 0xD0
#define CMD_ERASE_SETUP 0x20
#define CMD_ERASE_CONFIRM 0xD0
#define CMD_SUSPEND 0xB0
#define CMD_RESUME 0xD0
#define CMD_LOCK_SETUP 0x60
#define CMD_LOCK_CONFIRM 0x01
#define CMD_UNLOCK_CONFIRM 0xD0
#define CMD_LOCKDOWN_CONFIRM 0x2F
#define CMD_PROT_REG_PROGRAM 0xC0
/*
Status Register Masks
*/
#define REG_STATUS_DWS 0x80 /* Bit:7 Ready */
#define REG_STATUS_ESS 0x40 /* Bit:6 Block Erase Suspended */
#define REG_STATUS_ES 0x20 /* Bit:5 Error in Block Erasure / Clear Lock-Bit(for J3D) */
#define REG_STATUS_PS 0x10 /* Bit:4 Program Error / Error in Setting Lock-Bit(for J3D) */
#define REG_STATUS_VPPS 0x08 /* Bit:3 Low Programming Voltage Detected */
#define REG_STATUS_PSS 0x04 /* Bit:2 Program Suspended */
#define REG_STATUS_BLS 0x02 /* Bit:1 Block Lock-Bit Detected, Operation Abort */
#define REG_STATUS_PWS 0x01 /* Bit:0 */
#define REG_STATUS_SEQ 0x30 /* Bits:4,5 Sequence Error */
/* Block's Lock Status
* For flash devices that support block locking capabilities, these
* values are used to report the lock status of an erase block.
*/
#define BLOCK_LOCKED_DOWN 0x02 /* Bit:1 indicates Block Lock-Down status. DQ1 =
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -