/**********************************************************************************************************************
 *  COPYRIGHT
 *  -------------------------------------------------------------------------------------------------------------------
 *  \verbatim
 *                 TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION
 *
 *                 Property of Texas Instruments, Unauthorized reproduction and/or distribution
 *                 is strictly prohibited.  This product  is  protected  under  copyright  law
 *                 and  trade  secret law as an  unpublished work.
 *                 (C) Copyright Texas Instruments - 2014.  All rights reserved.
 *
 *  \endverbatim
 *  -------------------------------------------------------------------------------------------------------------------
 *  FILE DESCRIPTION
 *  -------------------------------------------------------------------------------------------------------------------
 *         File:  Fee_Cfg.h
 *      Project:  Tms570_TIFEEDriver
 *       Module:  FeeDriver Configuration Header File Fee_Cfg.h
 *    Generator:  EB Tresos
 *
 *  Description:  This file is generated by EB Tresos.Do not modify this file, otherwise the software may 
 *                behave in unexpected way.
 *---------------------------------------------------------------------------------------------------------------------
 * Author:  Vishwanath Reddy
 *---------------------------------------------------------------------------------------------------------------------
 * Template Revision History
 *---------------------------------------------------------------------------------------------------------------------
 * Version        Date         Author               Change ID        Description
 *--------------------------------------------------------------------------------------------------------------------- 
 * 02.21.00       30Sep2014    Vishwanath reddy     SDOCM00113128    Initial Version
 * 02.21.01       30Jun2016    Vishwanath Reddy     SDOCM00122388    Add FEE_TOTAL_BLOCKS_DATASETS.
 *                                                                    Update version history.
 *                                                                    FEE_FLASH_CRC_ENABLE is renamed to 
 *                                                                    FEE_FLASH_CHECKSUM_ENABLE. 
 * 02.21.02       04Aug2016    Vishwanath Reddy     SDOCM00122571    Update patch version FEE_SW_PATCH_VERSION. 
 * 02.21.03       23Aug2016    Vishwanath Reddy     SDOCM00122617    Update patch version FEE_SW_PATCH_VERSION.
 * 02.30.00       01Dec2016    Sudhakar Singh           None         Update version info
 * 05.30.00       15Mar2017    Sudhakar Singh       SDOCM00122834    Version supports TMS570LSxx Family of Devices.
 *********************************************************************************************************************/

 /*********************************************************************************************************************
    Project: [!"$project"!]
	Date   : [!"$datetime"!] 
	
    This file is generated by EB Tresos 
    Do not modify this file, otherwise the software may behave in unexpected way.
    
 *********************************************************************************************************************/
 
#ifndef FEE_CFG_H
#define FEE_CFG_H

#include "Device_header.h"
#include "MemIf_Types.h"

/*
 *  Version identification
 */
#define FEE_CFG_MAJOR_VERSION               (5U)
#define FEE_CFG_MINOR_VERSION               (30U)
#define FEE_CFG_PATCH_VERSION               (0U)

#define FEE_AR_RELEASE_MAJOR_VERSION     (4U)
#define FEE_AR_RELEASE_MINOR_VERSION     (0U)
#define FEE_AR_RELEASE_REVISION_VERSION  (3U)


/* Callback functions. Only relevant if Polling mode is OFF */
#define FEE_POLLING_MODE   	   				[!IF "as:modconf('Fee')[1]/FeeGeneral/FeePollingMode = 'true'"!](STD_ON)[!ELSE!](STD_OFF)[!ENDIF!]
#define FEE_NVM_JOB_END_NOTIFICATION		[!"as:modconf('Fee')[1]/FeeGeneral/FeeNvmJobEndNotification"!]
#define FEE_NVM_JOB_ERROR_NOTIFICATION		[!"as:modconf('Fee')[1]/FeeGeneral/FeeNvmJobErrorNotification"!]

/* Device Operating Frequency */
#define FEE_OPERATING_FREQUENCY				([!"as:modconf('Fee')[1]/FeeGeneral/FeeOperatingFrequency"!])

/* Block Configuration */
[!VAR "varmax" = "0"!][!LOOP "as:modconf('Fee')[1]/FeeBlockConfiguration/*"!][!VAR "varmax" = "$varmax+1"!][!ENDLOOP!]#define FEE_NUMBER_OF_BLOCKS      ([!"num:i($varmax)"!]U)							 
							 
[!VAR "varmax" = "0"!][!LOOP "as:modconf('Fee')[1]/FeeBlockConfiguration/*"!][!VAR "varmax" = "$varmax + FeeNumberOfDataSets"!][!ENDLOOP!]#define FEE_TOTAL_BLOCKS_DATASETS      ([!"num:i($varmax)"!]U)		

#define FEE_NUMBER_OF_UNCONFIGUREDBLOCKSTOCOPY	([!"as:modconf('Fee')[1]/FeeGeneral/FeeNumberOfNonConfiguredBlocksToCopy"!]U)
/* SourceId : FEE_SourceId_019 */
/* DesignId : FEE4x_DesignId_005 */
/* Requirements : AR_FEE_SR145 */
#define FEE_BLOCK_OVERHEAD						([!"as:modconf('Fee')[1]/FeePublishedInformation/FeeBlockOverhead"!]U)

/* Virtual Sector Configuration */
[!VAR "varmax1" = "0"!][!LOOP "as:modconf('Fee')[1]/FeeVirtualSectorConfiguration/*"!][!VAR "varmax1" = "$varmax1+1"!][!ENDLOOP!]#define FEE_NUMBER_OF_VIRTUAL_SECTORS      ([!"num:i($varmax1)"!]U)		 
#define FEE_NUMBER_OF_VIRTUAL_SECTORS_EEP1	([!"as:modconf('Fee')[1]/FeeGeneral/FeeNumberOfVirtualSectorForEEP2"!]U)
/* SourceId : FEE_SourceId_021 */
/* DesignId : FEE4x_DesignId_007 */
/* Requirements : AR_FEE_SR136 */
#define FEE_VIRTUAL_PAGE_SIZE				([!"as:modconf('Fee')[1]/FeeGeneral/FeeVirtualPageSize"!]U)
#define FEE_VIRTUAL_SECTOR_OVERHEAD			([!"as:modconf('Fee')[1]/FeePublishedInformation/FeeVirtualSectorOverhead"!]U)
/* SourceId : FEE_SourceId_020 */
/* DesignId : FEE4x_DesignId_006 */
/* Requirements : AR_FEE_SR147 */
#define FEE_PAGE_OVERHEAD					([!"as:modconf('Fee')[1]/FeePublishedInformation/FeePageOverhead"!]U)

/* Misc Configuration */
#define FEE_MAXIMUM_BLOCKING_TIME			([!"as:modconf('Fee')[1]/FeePublishedInformation/FeeMaximumBlockingTime"!])
/* SourceId : FEE_SourceId_016 */
/* DesignId : FEE4x_DesignId_001 */
/* Requirements : AR_FEE_SR18 */
#define FEE_DEV_ERROR_DETECT   				[!IF "as:modconf('Fee')[1]/FeeGeneral/FeeDevErrorDetect = 'true'"!](STD_ON)[!ELSE!](STD_OFF)[!ENDIF!]
#define FEE_VERSION_INFO_API   				[!IF "as:modconf('Fee')[1]/FeeGeneral/FeeVersionInfoApi = 'true'"!](STD_ON)[!ELSE!](STD_OFF)[!ENDIF!]
#define FEE_SET_MODE_SUPPORTED 				[!IF "as:modconf('Fee')[1]/FeeGeneral/FeeSetModeSupported = 'true'"!](STD_ON)[!ELSE!](STD_OFF)[!ENDIF!]
#define FEE_FLASH_ERROR_CORRECTION_ENABLE 	[!IF "as:modconf('Fee')[1]/FeeGeneral/FeeErrorCorrectionEnable = 'true'"!](STD_ON)[!ELSE!](STD_OFF)[!ENDIF!]
#define FEE_FLASH_ERROR_CORRECTION_HANDLING [!IF "as:modconf('Fee')[1]/FeeGeneral/FeeErrorCorrectionHandling = 'true'"!](Fee_Fix)[!ELSE!](Fee_None)[!ENDIF!]
#define FEE_FLASH_CHECKSUM_ENABLE 				[!IF "as:modconf('Fee')[1]/FeeGeneral/FeeChecksumEnable = 'true'"!](STD_ON)[!ELSE!](STD_OFF)[!ENDIF!]
#define FEE_FLASH_WRITECOUNTER_SAVE 		[!IF "as:modconf('Fee')[1]/FeeGeneral/FeeWriteCounterSave = 'true'"!](STD_ON)[!ELSE!](STD_OFF)[!ENDIF!]
/* SourceId : FEE_SourceId_022 */
/* DesignId : FEE4x_DesignId_008 */
/* Requirements : AR_FEE_SR130 */
#define FEE_INDEX							([!"as:modconf('Fee')[1]/FeeGeneral/FeeIndex"!]U)
/* SourceId : FEE_SourceId_018 */
/* DesignId : FEE4x_DesignId_002 */
/* Requirements : AR_FEE_SR179 */
#define FEE_NUMBER_OF_EEPS					([!"as:modconf('Fee')[1]/FeeGeneral/FeeNumberOfEeps"!]U)
#define FEE_NUMBER_OF_EIGHTBYTEWRITES		([!"as:modconf('Fee')[1]/FeeGeneral/FeeNumberOfEightByteWrites"!]U)
#define FEE_CHECK_BANK7_ACCESS		        [!IF "as:modconf('Fee')[1]/FeeGeneral/FeeCheckBank7Access = 'true'"!](STD_ON)[!ELSE!](STD_OFF)[!ENDIF!]

#endif /*FEE_CFG_H_*/

/**********************************************************************************************************************
 *  END OF FILE: Fee_Cfg.h
 *********************************************************************************************************************/

