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

📄 m512_exp.h

📁 M-System DOC(Disk on a Chip) Flash芯片的诊断工具, 可以从Flash芯片中获取特定的数据信息, 用于判断芯片当前的状态.
💻 H
📖 第 1 页 / 共 3 页
字号:
/***********************************************************************************/
/*                        M-Systems Confidential                                   */
/*           Copyright (C) M-Systems Flash Disk Pioneers Ltd. 1995-2003            */
/*                         All Rights Reserved                                     */
/***********************************************************************************/
/*                            NOTICE OF M-SYSTEMS OEM                              */
/*                           SOFTWARE LICENSE AGREEMENT                            */
/*                                                                                 */
/*      THE USE OF THIS SOFTWARE IS GOVERNED BY A SEPARATE LICENSE                 */
/*      AGREEMENT BETWEEN THE OEM AND M-SYSTEMS. REFER TO THAT AGREEMENT           */
/*      FOR THE SPECIFIC TERMS AND CONDITIONS OF USE,                              */
/*      OR CONTACT M-SYSTEMS FOR LICENSE ASSISTANCE:                               */
/*      E-MAIL = info@m-sys.com                                                    */
/***********************************************************************************/

/*
 * $Log:   V:/PVCSDB/DiskOnChip/archives/general storage/TrueFFS/src/mtd/m512_exp.h-arc  $
 * 
 *    Rev 1.5   Jan 27 2004 08:14:02   oris
 * Changed comments
 * 
 *    Rev 1.4   Sep 30 2003 17:54:14   oris
 * changed comments
 * 
 *    Rev 1.3   Jun 02 2003 08:53:30   roneng
 * Change printings
 * 
 *    Rev 1.2   May 16 2003 00:57:40   OriS
 * Added M512_protectionKeyInsert prototype.
 * 
 *    Rev 1.1   Apr 13 2003 20:29:38   OriS
 * Added fast read routine.
 * 
 *    Rev 1.0   Apr 09 2003 12:15:54   OriS
 * Initial revision.
 * 
 */

/************************************************************************
 * Name    : M512_exp.h                                                 *
 *                                                                      *
 * Written : Ronen Golan                                                *
 *                                                                      *
 * Abstract: This file contains the exported from the physical MTD      *
 ************************************************************************/

#ifndef _M512_EXP_H
#define _M512_EXP_H


/****************************** Macros *********************************/
/***********************************************************************
 * Name : M512_DPS0_LowProtectedUnit                                                  
 *   returns DPS0 low Protected unit  
 *
 ***********************************************************************/
#define M512_DPS0_LowProtectedUnit(volume) \
        (M512_Read16BitReg(volume,M512_DPS0_ADDRESS_LOW_REG))  

/***********************************************************************
 * Name : M512_DPS0_HighProtectedUnit                                                  
 *   returns DPS0 low Protected unit  
 *
 ***********************************************************************/
#define M512_DPS0_HighProtectedUnit(volume) \
        (M512_Read16BitReg(volume,M512_DPS0_ADDRESS_HIGH_REG))

/***********************************************************************
 * Name : M512_DPS1_LowProtectedUnit                                                  
 *   returns DPS0 low Protected unit  
 *
 ***********************************************************************/
#define M512_DPS1_LowProtectedUnit(volume) \
        (M512_Read16BitReg(volume,M512_DPS1_ADDRESS_LOW_REG))

/***********************************************************************
 * Name : M512_DPS1_HighProtectedUnit                                                  
 *   returns DPS0 low Protected unit  
 *
 ***********************************************************************/
#define M512_DPS1_HighProtectedUnit(volume) \
        (M512_Read16BitReg(volume,M512_DPS1_ADDRESS_HIGH_REG))
  
/***********************************************************************
 * Name : M512_DPS0_UnitLocation                                                  
 *   returns DPS0 unit location in the Flash 
 *
 ***********************************************************************/
#define M512_DPS0_UnitLocation(volume)               1

/***********************************************************************
 * Name : M512_DPS1_UnitLocation                                                  
 *   returns DPS1 unit location in the Flash 
 *
 ***********************************************************************/
#define M512_DPS1_UnitLocation(volume)               3
                                     
/***********************************************************************
 * Name : M512_IsDPS0_WP                                                 
 *   Checks if dps is write protected 
 *
 * Returns:        
 *   None 0  - DPS_0 is write protected          
 *   0       - DPS_0 is NOT write protected 
 ***********************************************************************/
#define M512_IsDPS0_WP(volume) \
        (M512_Read8BitReg(volume,M512_DPS0_STATUS_REG) & M512_WRITE_PROTECTED)
           
/***********************************************************************
 * Name : M512_IsDPS1_WP                                                 
 *   Checks if dps is write protected 
 *
 * Returns:        
 *   None 0  - DPS_1 is write protected          
 *   0       - DPS_1 is NOT write protected 
 ***********************************************************************/
#define M512_IsDPS1_WP(volume) \
        (M512_Read8BitReg(volume,M512_DPS1_STATUS_REG) & M512_WRITE_PROTECTED)

/***********************************************************************
 * Name : M512_IsDPS0_RP                                                 
 *   Checks if DPS is read protected 
 *
 * Returns:        
 *   None 0  - DPS_0 is read protected
 *   0       - DPS_0 is NOT read protected
 ***********************************************************************/
#define M512_IsDPS0_RP(volume) \
        (M512_Read8BitReg(volume,M512_DPS0_STATUS_REG) & M512_READ_PROTECTED)

/***********************************************************************
 * Name : M512_IsDPS1_RP                                                 
 *   Checks if DPS is read protected 
 *
 * Returns:        
 *   None 0  - DPS_1 is read protected
 *   0       - DPS_1 is NOT read protected
 ***********************************************************************/
#define M512_IsDPS1_RP(volume) \
        (M512_Read8BitReg(volume,M512_DPS1_STATUS_REG) & M512_READ_PROTECTED)

/***********************************************************************
 * Name : M512_IsDPS0_LOCK_Enabled                                                  
 *   Checks if DPS is HW_LOCK protected 
 *
 * Returns:        
 *   None 0  - DPS_0 HW locked          
 *   0       - DPS_0 is not HW locked
 ***********************************************************************/
#define M512_IsDPS0_LOCK_Enabled(volume) \
        (M512_Read8BitReg(volume,M512_DPS0_STATUS_REG) & M512_HW_LOCK_ENABLED)

/***********************************************************************
 * Name : M512_IsDPS1_LOCK_Enabled                                                
 *   Checks if DPS is HW_LOCK protected 
 *
 * Returns:        
 *   None 0   - DPS_1 HW locked          
 *   0        - DPS_1 is not HW locked
 ***********************************************************************/
#define M512_IsDPS1_LOCK_Enabled(volume) \
        (M512_Read8BitReg(volume,M512_DPS1_STATUS_REG) & M512_HW_LOCK_ENABLED)
 
/***********************************************************************
 * Name : M512_Is_LOCK_Negated                                                 
 *   Checks if the LOCK# H/W signal is assterted 
 *
 * Returns:        
 *   None 0  - H/W LOCK# signal is assterted         
 *   0       - H/W LOCK# signal is asserted
 ***********************************************************************/
#define M512_Is_LOCK_Negated(volume) \
        (M512_Read8BitReg(volume,M512_PROTECTION_STATUS_REG) & M512_LOCK_INPUT_NEGATED)

/***********************************************************************
 * Name : M512_Is_StickyLOCK_Asserted                                                 
 *   Checks if the sticky lock signal is activated (asserted)
 *
 * Returns:        
 *   None 0  - Sticky lock activated (asserted)         
 *   0       - Sticky lock not activated (not asserted)   
 ***********************************************************************/
#define M512_Is_StickyLOCK_Asserted(volume) \
        (M512_Read8BitReg(volume,M512_PROTECTION_STATUS_REG) & M512_STICKY_LOCK_ACTIVATED)

/***********************************************************************
 * Name : M512_IsDPS0_KeyInserted                                                 
 *   Checks if the key is correct for DPS_0
 *
 * Returns:        
 *   None 0  - Key is correct The protected area is not locked          
 *   0       - Key is not the right one - DPS is protected 
 ***********************************************************************/
#define M512_IsDPS0_KeyInserted(volume) \
        (M512_Read8BitReg(volume,M512_DPS0_STATUS_REG) & M512_KEY_OK)

/***********************************************************************
 * Name : M512_IsDPS1_KeyInserted                                                 
 *   Checks if the key is correct for DPS_1
 *
 * Returns:        
 *   None 0  - Key is correct The protected area is not locked          
 *   0       - Key is not the right one - DPS is protected 
 ***********************************************************************/
#define M512_IsDPS1_KeyInserted(volume) \

⌨️ 快捷键说明

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