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

📄 defs.h

📁 M-System DOC(Disk on a Chip) Flash芯片的诊断工具, 可以从Flash芯片中获取特定的数据信息, 用于判断芯片当前的状态.
💻 H
字号:
/****************************************************************************/
/*																			*/
/*         Copyright 														*/
/*																			*/
/*         This software is supplied under the terms of a license			*/
/*         agreement or nondisclosure agreement and may not be copied		*/
/*         or disclosed except in accordance with the terms of that			*/
/*         agreement.														*/
/*																			*/
/****************************************************************************/
/*																			*/
/* Author         : Omer Katz 												*/
/* Creation date  : 15.08.01												*/
/* Filename       : Defs.h												*/
/*																			*/
/* Abstract       :															*/
/*	definitions																*/
/*																			*/
/****************************************************************************/
/*																			*/
/* Rev. Date        Author      Description									*/
/*--------------------------------------------------------------------------*/
/* 1.0	15.08.2001	O.Katz    	initial version								*/
/****************************************************************************/

#ifndef _DEFS_H_
#define _DEFS_H_


/*****************************************************************************/
/* proprietary include files												*/
/****************************************************************************/
#include "unitinc.h"

/****************************************************************************/
/* definitions																*/
/****************************************************************************/

#define MAX_UNIT_NUM   		  (12 * 1024)
#define MAX_UNIT_BIT   		  15
#define CREATE_NUM     		  (32L * 1024)
/****************************************************************************/
/****************************************************************************/
/****************************************************************************/
#define FILE_OPEN_ERROR(h) 	(h == -1)
#define PARSER_START	      1
#define DEFAULT_DOC_WINDOW  0xD0000L
#define DEFAULT_DOC_SIZE    16*MBYTE
#define IS_BAD(u)           ( u != 0xFF )
#define LENGHT              0x1
#define START               0x2
#define CAPACITY            0x4
/****************************************************************************/
#define FPWDO               0x01
#define FALE                0x02
#define FCLE                0x04
#define FWP                 0x08
#define FRE                 0x10
#define FWE                 0x20
#define RSTOUT              0x40
#define MAX_NAME            100
/****************************************************************************/

/****************************************************************************/
/* macros																*/
/****************************************************************************/
/*
#define physicalToPointer(physical,size)                                \
		MK_FP((int) ((physical) >> 4),(int) (physical) & 0xF)
*/
/****************************************************************************/
#define SET_END_STATUS(e,s)  e = ((e == flOK) ? s : e)
/****************************************************************************/
#define CHECK_STATUS(s,f,t) {                                           \
			if( s != flOK )                                   \
      {                                       \
        if ( f == NOT_CONTINUE )                     \
          return( s );                                      \
        else                                                \
          t = s;                                          \
      }                                                 \
		 }
/****************************************************************************/
#define CHECK_TEST(e,s,t)   {                                           \
		   SET_END_STATUS(e,s);                                     \
		   if( (testFlag & T_FORCE_TEST) == 0x00 ) {                \
                DinfoPrint(( EX_TEXT("%s [%lx]"), EX_TEXT(t), addr);          \
				break;                                                 \
		   }                                                        \
           DinfoPrint(( EX_TEXT("\n  %s [%lx]\n"), EX_TEXT(t), addr); }
/****************************************************************************/
#define STATUS_ERROR   Status != flOK
/****************************************************************************/
#define STATUS_OK   Status == flOK
/****************************************************************************/
#define END_WITH_ERROR(e)   return e
/****************************************************************************/
#define END_WITHOUT_ERROR()   return EX_OK
/****************************************************************************/
#define bdkRead8bitReg(offset) (BDKReg8bitType)(*((volatile DOCAccessType FAR0 *)bdkWin + offset))
/****************************************************************************/
#define bdkWrite8bitReg(offset,data) (*((volatile DOCAccessType FAR0 *)bdkWin + offset)) = DOC_DATA(data)



#define curFlash      flFlashOf( handle )
typedef volatile unsigned char FAR0*  DOCWINDOW;

FLStatus DINFO_INFO( EXBYTE handle );

/****************************************************************************/
/* globals																*/
/****************************************************************************/
#define PRINT_COLOR   PRINT
#define NFTL_TYPE     1
#define INFTL_TYPE    2


typedef enum
{
   PRINT_MSG,
   DO_NOT_PRINT_MSG,
};


/****************************************************************************/
/* structs																*/
/****************************************************************************/


#endif /* _DEFS_H_ */

⌨️ 快捷键说明

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