📄 fdi_type.h
字号:
/* ###########################################################################
### Intel Confidential
### Copyright (c) Intel Corporation 1995-2001
### All Rights Reserved.
### -------------------------------------------------------------------------
### Project: Flash Data Integrator
###
### Module: TYPE.H - This module consists of definitions that the OEM needs
### to evaluate when porting to his/her system.
###
### $Archive: /FDI/SRC/INCLUDE/fdi_type.h $
### $Revision: 122 $
### $Date: 10/18/04 10:10a $
### $Author: Ljchang $
### $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 WITH INTEL FLASH PRODUCTS. YOUR
* USE OF THE SOFTWARE WITH ANY OTHER FLASH PRODUCTS IS EXPRESSLY
* PROHIBITED UNLESS AND UNTIL YOU APPLY FOR, AND ARE GRANTED IN
* INTEL'S SOLE DISCRETION, A SEPARATE WRITTEN SOFTWARE LICENSE
* FROM INTEL LICENSING ANY SUCH USE.
*****************************************************************
*/
#ifndef TYPE_H
#define TYPE_H
/*
* The following is broken up into the following areas:
* - Customer Platform/OS Definitions
* Place platform specific declarations here
* (OS "*.h" includes, test engine, and hardware
* I/O declarations).
* - Platform configuration section
* Place OS, Test, and hardware configuration
* switches here.
* - FDI Feature Switches section
* This is where major IFDI features are switched ON/OFF.
* - FDI configuration section
* This is where major IFDI configuration is performed.
* - Basic Data Type Definitions
* This is where fundamental data types in IFDI are declared.
* - FDI abstraction typedefs and macros section
* This is where Platform abstraction macros are declared.
* In this section Platform declarations are combined to define
* how the platform abstraction macros for an implementation of IFDI.
* - Debug section
* This section is where debug features are switched and configured.
* - Globally used includes
* This is where include files used through out IFDI are placed.
*/
/*
* ### Customer Platform/OS Definitions:
* ############################################################################
*/
#include "fdi_cust.h"
/*
* ### Basic Data Type Definitions:
* ############################################################################
*/
/*
* These are what are used to create standard data types. If these are
* defined elsewhere, the three typedefs below can be removed. When doing
* so, is is imperative that the replacement definitions provide storage
* of the same number of bits and same sign as the definitions below.
*/
/*
* The following macro, BWD_TYPES, should initialy be undefined
* for stand alone FDI and customer use if BYTE, WORD, and DWORD
* are not already defined in the customer application code.
*/
#ifndef BWD_TYPES
typedef unsigned char BYTE; /* 8 bits wide, unsigned */
typedef unsigned short int WORD; /* 16 bits wide, unsigned */
typedef unsigned long DWORD; /* 32 bits wide, unsigned */
/* E.5.5.5.986 Begin */
/* Uncomment these type(s) if not defined elsewhere */
/*
typedef void VOID;
typedef unsigned char BOOL;
typedef unsigned char UINT8;
typedef unsigned short int UINT16;
typedef unsigned long UINT32;
*/
/* E.5.5.5.986 End */
#endif /* BWD_TYPES */
/*
* The following macro, PTR_TYPES, should initialy be undefined
* for stand alone FDI and customer use if VOID_PTR,
* BYTE_PTR, DWORD_PTR, BYTE_BITMASK, and VOID_PTR_PTR
* are not already defined in the customer application code.
*/
#ifndef PTR_TYPES
typedef void * VOID_PTR;
typedef BYTE * BYTE_PTR;
typedef WORD * WORD_PTR;
typedef DWORD * DWORD_PTR;
typedef BYTE BYTE_BITMASK; /* 8 bits wide mask */
typedef VOID_PTR * VOID_PTR_PTR;
/* E.5.5.5.986 Begin */
/* Uncomment these type(s) if not defined elsewhere */
/*
typedef BOOL * BOOL_PTR;
typedef UINT8 * UINT8_PTR;
typedef UINT16 * UINT16_PTR;
typedef UINT32 * UINT32_PTR;
*/
/* E.5.5.5.986 End */
#endif /* PTR_TYPES */
#ifndef TRUE
#define TRUE 1
#endif /* !TRUE */
#ifndef FALSE
#define FALSE 0
#endif /* !FALSE */
#ifndef NULL
#define NULL ((void *)0)
#endif /* !NULL */
/*
* ### Platform configuration section:
* ############################################################################
*/
/*
* FLASH_DATA_WIDTH is equal to the width of the data bus to flash. For a
* 16-bit data bus, typedef a WORD to FLASH_DATA_WIDTH. For a 32-bit data
* bus, typedef a DWORD to FLASH_DATA_WIDTH.
*/
typedef WORD FLASH_DATA_WIDTH;
/*
* If two flash components comprise the width of the data bus, set the
* following option to TRUE; otherwise, the option should be set to FALSE.
*/
#define FLASH_PAIRED FALSE
#ifndef FLASH_START_ADDRESS
/* Set this address to be the appropriate address for the part being used */
#define FLASH_START_ADDRESS 0x10000000
#endif /* !FLASH_START_ADDRESS */
/*
* ### FDI Feature Switches section:
* ############################################################################
*/
#define DIRECT_ACCESS_VOLUME FALSE /* Enable this for DAV capability */
#if (DIRECT_ACCESS_VOLUME == TRUE) /* Select the DAV blocks. Must be
* outside the range specified for
* FDI data types
* (i.e. NUM_BOOT_BLOCKS,
* NUM_DATA_BLOCKS). */
#define DAV_START_ADDRESS 0x10020000 /* address at which the Direct Access
* Volume begins */
#define DAV_BLOCKCOUNT 16 /* number of code storage blocks */
#define DAV_BLOCK_SIZE 0x20000 /* number of bytes in each block of
* the direct access volume. */
#define DAV_NUM_CLASS_FILES 254
#endif /* DIRECT_ACCESS_VOLUME */
#define FILE_MANAGER FALSE /* Enable this for FM support */
#if (FILE_MANAGER == TRUE)
typedef char FDI_TCHAR; /* size of character */
#define NUM_FILES 16 /* Supported number of files. Must be
* greater than 0 and less than
* 65,535. */
#define NUM_OPEN_FILES 16 /* Number of simultaneous open files
* supported. Must be greater than
* 0 and less than or equal to
* NUM_FILES. */
#define FILE_SUPPORT_INFO_TYPE 12 /* File info structure's FDI type */
#define FILE_SUPPORT_DATA_TYPE 13 /* Raw data's FDI type */
#define FILE_NAME_SIZE 16 /* Maximum length of filename */
#endif /* FILE_MANAGER */
#define INCLUDE_FORMAT TRUE /* True includes format code, false
* excludes */
#define CONSISTENT_ACCESS_TIME FALSE/*Enable this for Consistent Access Time
Support*/
/*
* This define includes the capability to have data that fragments and is
* tracked by sequence tables if set to TRUE. Taking this option out prevents
* the fragmentation of data, saves 10-12 KB of ROM, and prevents any attempts
* to fragment data by returning an error code
*/
/*E.5.5 946 Begin */
/* Move this definition to fdi_int.h*/
/*#define INCLUDE_FRAGMENTED_DATA FALSE */
/*E.5.5 946 End */
#define DATA_STREAM TRUE /* Set to TRUE if need to maintain a
* data rate otherwise set to FALSE */
#define FDI_NONE 0
#define SINGLE_PR 1
#define NUM_USER_PR_REGISTERS 17 /* number of user protection
* registers in the flash part
* There are 17 user protection
* registers in Trumbull. */
#define ENABLE_PR SINGLE_PR /* number of user protection
* number of user protection
* registers in the flash part */
/*
* To enable protection register support, the absolute starting address of
* the parameter partition must be supplied. If a parameter partition is
* not present on the flash component(s), the starting address of flash
* must be specified.
*/
#define PARAMETER_PARTITION_START_ADDRESS FLASH_START_ADDRESS
#define BLOCK_LOCK_SUPPORT TRUE /* Turn on flex locking capability */
#define ENABLE_NONFDI_BLOCKLOCKING TRUE
#define ENABLE_FDI_BLOCKLOCKING TRUE
#if (INCLUDE_FRAGMENTED_DATA == TRUE)
#define PACKET_DATA TRUE
#endif /* INCLUDE_FRAGMENTED_DATA */
#define PARAM_CHECK TRUE
/* When setting PARTITONS to SINGLE, FDI will treat the NUM_DATA_BLOCKS blocks
* as one partition, interrupt polling or DIH is needed.
* DUAL, will not use interrupt polling or DIH.
* MULTI is essentially the same as dual but this option can be used when the
* Flash part supports read while write(RWW).
*/
#define SINGLE 1
#define DUAL 2
#define MULTI 3
#define PARTITIONS SINGLE /* Set to SINGLE/DUAL/MULTI when
* using Intel SINGLE/DUAL/MULTI
* Partition architecture components
* respectively. */
#define FREE_SPACE_FUNCTIONS TRUE /* Turn on/off free space function */
/* To disable the Data Volume expansion feature, set ADD_BLOCK to FALSE. To
* add blocks before the Data Volume, set ADD_BLOCK to BEFORE. To add blocks
* after the Data Volume, set ADD_BLOCK to AFTER.
*/
#define BEFORE 1 /* Add Blocks before existing data
* blocks */
#define AFTER 2 /* Add Blocks after existing data
* blocks */
#define ADD_BLOCK FALSE /* Turn on/off Add block feature */
/*
* ### FDI configuration section:
* ############################################################################
*/
#define FDV_START_ADDRESS 0x10200000 /* address at which the Data Volume
* begins. */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -