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

📄 flchkdef.h

📁 M-System DOC(Disk on a Chip) Flash芯片的诊断工具, 可以从Flash芯片中获取特定的数据信息, 用于判断芯片当前的状态.
💻 H
📖 第 1 页 / 共 2 页
字号:
/***********************************************************************************/
/*                        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/include/flchkdef.h-arc  $
 * 
 *    Rev 1.19   Jan 18 2004 02:34:20   oris
 * TrueFFS 6.2.1
 * 
 *    Rev 1.18   Nov 16 2003 18:55:32   omerk
 * Remove the Marcos: FL_PACKED_STRUCTURES_BEGIN,  FL_PACKED_STRUCTURES_END .
 * 
 * 
 *    Rev 1.17   Nov 09 2003 17:06:12   OmerK
 * Added default FL_PACKED_STRUCTURES_BEGIN and FL_PACKED_STRUCTURES_END for forced packed structures.
 * 
 *    Rev 1.16   Oct 23 2003 22:41:28   OriS
 * Moved check of FL_TLS and FL_MTDS
 * 
 *    Rev 1.15   Oct 23 2003 13:57:06   oris
 * Chaneged TrueFFS version number to 6200 instead of 6100.
 * 
 *    Rev 1.14   Sep 30 2003 17:58:10   oris
 * Added FL prefix to SECTOR_SIZE and SECTOR_SIZE_BITS
 * Added backward compatibility check for users that used to 
 * call SureFS API without the FL_ prefix
 * 
 *    Rev 1.13   Sep 01 2003 19:08:14   oris
 * - Added default Programmer type and version FL_PROGRAMMER_NAME , FL_PROGRAMMER_VERSION
 * - Changed TLS and MTDS with FL_TLS and FL_MTDS
 * - Added default FL_PACKED_STRUCTURES prefix for forced packed structures.
 * - Removed tffsRAMXXX calls.
 * - Added default FLTXT macro for converting text to printable text strings.
 * 
 *    Rev 1.12   Jun 19 2003 13:35:44   OriS
 * Removed warnings
 * 
 *    Rev 1.11   Jun 17 2003 15:45:28   oris
 * Removed warnings
 * 
 *    Rev 1.10   Jun 16 2003 01:18:08   oris
 * Made sure TFFS_DLL_API was defined.
 * 
 *    Rev 1.9   May 18 2003 13:28:56   OriS
 * Check for FORMAT_VOLUME with FL_READ-ONLY
 * 
 *    Rev 1.8   May 16 2003 00:57:00   OriS
 * Changed ASSUMED_SECTORS_PER_UNIT to  FL_ASSUMED_MAX_SECTORS_PER_UNIT
 * 
 *    Rev 1.7   May 12 2003 22:53:24   oris
 * Added default POLLING_INTERVAL definition.
 * 
 *    Rev 1.6   May 11 2003 14:06:14   OriS
 * Changed MAX_VOLUME_MBYTES to FL_ASSUMED_MAX_VOLUME_MBYTES
 * Changed ASSUMED_NFTL_UNIT_SIZE to FL_ASSUMED_MIN_UNIT_SIZE
 * 
 *    Rev 1.5   May 11 2003 08:26:14   OriS
 * Removed FL_LEAVE_BINARY_AREA and FL_LEAVE_SOME_BINARY_ARE sanity checks since they were removed.
 * Added FL_LOW_LEVEL definition as a default.
 * 
 *    Rev 1.4   May 08 2003 23:19:14   OriS
 * Added FL_QUICK_MOUNT_INFO_EXIST definition for TrueFFS 5.2
 * 
 *    Rev 1.3   May 06 2003 11:54:34   OriS
 * Changed TL_CACHE to FL_TL_CACHE
 * Added memory manipulation routine checks
 * Removed FLCPY_XXX macros
 * 
 *    Rev 1.2   Apr 27 2003 09:01:20   Oris
 * Compilation errors for BDK module.
 * 
 *    Rev 1.1   Apr 13 2003 20:29:28   OriS
 * Fixed compilation error for BDK
 * 
 *    Rev 1.0   Apr 09 2003 12:15:58   OriS
 * Initial revision.
 * 
 */
/************************//* TrueFFS source files *//* -------------------- *//************************//****************************************************************************** File Header                                                                ** -----------                                                                ** Name : flchkdef.h                                                          **                                                                            ** Description : Sanity check for flcustom.h files.                           **                                                                            ******************************************************************************/#ifndef _FL_CHK_DEFS_H_#define _FL_CHK_DEFS_H_#include "flcustom.h"
#include "flsystem.h"
#ifndef MTD_STANDALONE 

/* TrueFFS version * * Number written on the flash by INFTL format specifing the TrueFFS version * The media was formated with. the number bellow specifies version * 6.0.0.0 */#define TrueFFSVersion "6210"/* BIOS Driver EXB file competability version * * This number is compared to the one written in the EXB file header * The TrueFFS formatter will reject files with BIOS driver version other * then the one it was compiled with. */#define BiosDriverEXBVersion "6210"   /* Programmer type version 
 * 
 * This string is placed in the media header indicating the programmer
 * Name and version used to format the media 
 */

#ifndef FL_PROGRAMMER_NAME
#define FL_PROGRAMMER_NAME    "CORE"
#endif /* FL_PROGRAMMER_NAME */

#ifndef FL_PROGRAMMER_VERSION
#define FL_PROGRAMMER_VERSION "0000"
#endif /* FL_PROGRAMMER_VERSION */


/*******************************************//* Validity check and overlapping defines  *//*******************************************//* Validity check for BDK_ACCESS */#if (defined (WRITE_EXB_IMAGE) && !defined (BDK_ACCESS))#error "Please make sure BDK_ACCESS is defined in your flcustom.h file\r\n"#endif/* The format option needs some internal defintions */#ifdef FORMAT_VOLUME#ifndef MTD_RECONSTRUCT_BBT#define MTD_RECONSTRUCT_BBT /* Compile code to scan virgin cards for BBT */#endif /* MTD_RECONSTRUCT_BBT */#ifdef FL_READ_ONLY#error "You can not defined FL_READ_ONLY and FORMAT_VOLUME at the same time"#endif /* FL_READ_ONLY */#endif /* FORMAT_VOLUME *//* VERIFY_ERASED_SECTOR should always come together with VERIFY_WRITE */#if (defined (VERIFY_WRITE) && !defined (VERIFY_ERASED_SECTOR))#define VERIFY_ERASED_SECTOR#endif #if (!defined (VERIFY_WRITE) && defined (VERIFY_ERASED_SECTOR))#define VERIFY_WRITE#endif /* Validity check for system files MACROES */#ifndef FL_FOPEN#define FL_FOPEN#endif /* FL_FOPEN */#ifndef FL_FCLOSE#define FL_FCLOSE#endif /* FL_FCLOSE */#ifndef FL_FPRINTF#define FL_FPRINTF#endif /* FL_FPRINTF *//* Validity check of DRIVES , VOLUMES and SOCKETS parameters. * Note that DRIVES definition was left for abckwards compatibility */#if (defined(DRIVES) && (defined(SOCKETS) || defined(VOLUMES)))#error "Drives is permited only as long as SOCKETS and VOLUMES are not defined"#else#ifdef DRIVES#define SOCKETS DRIVES#define VOLUMES DRIVES#else#if (!defined(VOLUMES) && !defined(SOCKETS))#error "Neither DRIVER, VOLUMES and SOCKETS are defined"#else#if (!defined(VOLUMES) && defined(SOCKETS))#define VOLUMES SOCKETS /* both VOLUMES and SOCKETS must be defined */#else#if !defined(SOCKETS) && defined(VOLUMES)#define SOCKETS VOLUMES /* both VOLUMES and SOCKETS must be defined */#else#if (SOCKETS>VOLUMES)#error "SOCKETS should not be bigger then VOLUMES"#endif /*   SOCKETS >    VOLUMES */#endif /* ! SOCKETS &&   VOLUMES */#endif /*   SOCKETS && ! VOLUMES */#endif /* ! SOCKETS && ! VOLUMES */#endif /*         DRIVES         */#endif /* DRIVES && (SOCKETS || VOLUMES) */
/* The POLLING_INTERVAL definition is not really relevant to DiskOnChip
 * Starting from TrueFFS 6.1 it was removed from flcustom.h, but TrueFFS
 * still support this functionality.
 */
#ifndef POLLING_INTERVAL
#define POLLING_INTERVAL 0
#endif /* POLLING_INTERVAL */

/* Since TrueFFS supports TL's other then NFTL, the name was changed and now * both NFTL_CACHE and FL_TL_CACHE will compile the TL's internal cache code. */#if ((defined(FL_TL_CACHE)) && (!defined(NFTL_CACHE)))#define NFTL_CACHE #endif #if ((!defined(FL_TL_CACHE)) && (defined(NFTL_CACHE)))#define FL_TL_CACHE #endif /* TrueFFS 5.1 requires a definition for MIN_CLUSTER_SIZE when FORMAT_VOLUME * is defined. */#if (!defined(MIN_CLUSTER_SIZE) && defined (FORMAT_VOLUME))#define MIN_CLUSTER_SIZE   4#endif /* not MIN_CLUSTER_SIZE && FORMAT_VOLUME *//* TrueFFS 5.2 used the FL_QUICK_MOUNT_INFO_EXIST defintion. TrueFFS 6.1
 * uses simple FL_ON and FL_OFF instead.
 */

#define FL_QUICK_MOUNT_INFO_EXIST 1 

/* Starting from TrueFFS 6.1 this flag does not reduce code and therfore was
 * added as a default.
 *
 */

#define FL_LOW_LEVEL

/* Some S/W modules like boot SDK do not need the read bad blocks tables routine.
 * However for TrueFFS these defintion is vital
 */

#define MTD_READ_BBT        /* Compile the read BBT routine code         */

#ifndef FL_DEFAULT_CACHE_SIZE_FOR_MINIMAL_CACHE
#define FL_DEFAULT_CACHE_SIZE_FOR_MINIMAL_CACHE 0x40
#endif  /* FL_DEFAULT_CACHE_SIZE_FOR_MINIMAL_CACHE */

#else  /* MTD_STANDALONE */

#ifndef NO_READ_BBT_CODE

/* When compiled in the BDK mode, the read BBT code wiill be compiled unless
 * NO_READ_BBT_CODE was defined.
 */
#define MTD_READ_BBT        /* Compile the read BBT routine code         */

#endif /* NO_READ_BBT_CODE */

#define SOCKETS            1 /* The only available number */
#define FIXED_MEDIA
#define DO_NOT_YIELD_CPU

#endif /* MTD_STANDALONE */

/* The TLS and MTDS constants where changed in TrueFFS 6.2 to a
 * more generic name : FL_TLS and FL_MTDS
 */

#ifndef FL_TLS
#define FL_TLS TLS
#endif /* FL_TLS */
#ifndef FL_MTDS
#define FL_MTDS MTDS
#endif /* FL_MTDS */

/* These defines allow the user to add a prefix to the exported API */
#ifndef NAMING_CONVENTION
#define NAMING_CONVENTION
#endif /* NAMING_CONVENTION */
#ifndef TFFS_DLL_API
#define TFFS_DLL_API
#endif /* TFFS_DLL_API */
#ifndef FL_PACKED_STRUCTURES
#define FL_PACKED_STRUCTURES
#endif /* FL_PACKED_STRUCTURES */

/* Starting from TrueFFS version 6.x the ASSUMED_NFTL_UNIT_SIZE was changed to
 * FL_ASSUMED_MIN_UNIT_SIZE. 
 */

#ifndef FL_ASSUMED_MIN_UNIT_SIZE
#define FL_ASSUMED_MIN_UNIT_SIZE        ASSUMED_NFTL_UNIT_SIZE
#endif /* FL_ASSUMED_MIN_UNIT_SIZE */

/* Starting from TrueFFS version 6.x the MAX_VOLUME_MBYTES was changed to
 * FL_ASSUMED_MAX_VOLUME_MBYTES. 
 */

#ifndef FL_ASSUMED_MAX_VOLUME_MBYTES
#define FL_ASSUMED_MAX_VOLUME_MBYTES        MAX_VOLUME_MBYTES
#endif /* FL_ASSUMED_MAX_VOLUME_MBYTES */

/* When using static allocation , SAFTL may requires the number of sectors * in a logical unit. This value can normaly be deduced from the unit size. * However if you need to support several DiskOnChip devices with diffrent * unit sizes, you may need to define the smallest unit size, while defining * the largest number of logical sectors in a logical unit */#ifndef FL_ASSUMED_MAX_SECTORS_PER_UNIT#define FL_ASSUMED_MAX_SECTORS_PER_UNIT (FL_ASSUMED_MIN_UNIT_SIZE>>FL_SECTOR_SIZE_BITS)#endif /* FL_ASSUMED_MAX_SECTORS_PER_UNIT */
/* Validiy check for FL_LOW_LEVEL compilation flag.

⌨️ 快捷键说明

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