/*!
* @file     Fee_Cfg.h
*
* @version  1.0.0
*
* @brief    This Headers file includes the configuration parameters of the Flash EEPROM Emulation module
*
* @attention
*
* Project Name      : AUTOSAR MCAL
*
* Platform          : Arm
*
* Autosar Standard  : Classic Platform 4.4.0
*
* Compiled Version  : G32A10xx_MCAL_1_0_0_01-Otc-25
*
* Copyright (C) 2026 Geehy Semiconductor
*
* You may not use this file except in compliance with the
* GEEHY COPYRIGHT NOTICE (Geehy Semiconductor Software License Agreement).
*
* The program is only for reference, which is distributed in the hope
* that it will be usefull and instructional for customers to develop
* their software. Unless required by applicable law or agreed to in
* writing, the program is distributed on an "AS IS" BASIS, WITHOUT
* ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
* See the Geehy Semiconductor Software License Agreement for the governing permissions
* and limitations under the License.
*/

#ifndef FEE_CFG_H
#define FEE_CFG_H

#ifdef __cplusplus
extern "C"{
#endif

#include "Fee_Types.h"

/** @addtogroup G32A10xx_StdPeriphDriver
  @{
*/

/** @defgroup FEE_Driver
  * @brief FEE driver modules
  @{
*/

/** @defgroup FEE_Macros
  @{
*/
/**********************************************************************************************************************
                                    VENDOR ID & AUTOSAR VERSION INFO
***********************************************************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define FEE_CFG_H_VENDOR_ID                         0x00C1U
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */
#define FEE_CFG_H_AR_RELEASE_MAJOR_VERSION          0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define FEE_CFG_H_AR_RELEASE_MINOR_VERSION          0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define FEE_CFG_H_AR_RELEASE_REVISION_VERSION       0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define FEE_CFG_H_SW_MAJOR_VERSION                  0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define FEE_CFG_H_SW_MINOR_VERSION                  0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define FEE_CFG_H_SW_PATCH_VERSION                  0x00U

/**@} end of group FEE_Macros */

/***********************************************************************************************************************
                                         VERSION INFOMATION VERIFICATION
***********************************************************************************************************************/
/* Make sure the vendor id is the same between Fee_Cfg.h and Fee_Types.h */
#if (FEE_CFG_H_VENDOR_ID != FEE_TYPES_H_VENDOR_ID)
    #error "Vendor id mismatch between Fee_Cfg.h and Fee_Types.h"
#endif
/* Make sure the AUTOSAR major version number is the same between Fee_Cfg.h and Fee_Types.h */
#if (FEE_CFG_H_AR_RELEASE_MAJOR_VERSION != FEE_TYPES_H_AR_RELEASE_MAJOR_VERSION)
    #error "AUTOSAR Major Version Number mismatch between Fee_Cfg.h and Fee_Types.h"
#endif
/* Make sure the AUTOSAR minor version number is the same between Fee_Cfg.h and Fee_Types.h */
#if (FEE_CFG_H_AR_RELEASE_MINOR_VERSION != FEE_TYPES_H_AR_RELEASE_MINOR_VERSION)
    #error "AUTOSAR minor Version Number mismatch between Fee_Cfg.h and Fee_Types.h"
#endif
/* Make sure the AUTOSAR revision version number is the same between Fee_Cfg.h and Fee_Types.h */
#if (FEE_CFG_H_AR_RELEASE_REVISION_VERSION != FEE_TYPES_H_AR_RELEASE_REVISION_VERSION)
    #error "AUTOSAR revision Version Number mismatch between Fee_Cfg.h and Fee_Types.h"
#endif
/* Make sure the software major version number is the same between Fee_Cfg.h and Fee_Types.h */
#if (FEE_CFG_H_SW_MAJOR_VERSION != FEE_TYPES_H_SW_MAJOR_VERSION)
    #error "Software Major Version Number mismatch between Fee_Cfg.h and Fee_Types.h"
#endif
/* Make sure the software minor version number is the same between Fee_Cfg.h and Fee_Types.h */
#if (FEE_CFG_H_SW_MINOR_VERSION != FEE_TYPES_H_SW_MINOR_VERSION)
    #error "Software Minor Version Number mismatch between Fee_Cfg.h and Fee_Types.h"
#endif
/* Make sure the software patch version number is the same between Fee_Cfg.h and Fee_Types.h */
#if (FEE_CFG_H_SW_PATCH_VERSION != FEE_TYPES_H_SW_PATCH_VERSION)
    #error "Software Patch Version Number mismatch between Fee_Cfg.h and Fee_Types.h"
#endif

/**********************************************************************************************************************
                                                  DEFINES AND MACROS
***********************************************************************************************************************/
/** @defgroup FEE_Macros
  @{
*/

/** Overhead size per logical block in bytes */
#define FEE_BLOCK_OVERHEAD_SIZE                  48U

/** Overhead size per logical cluster in bytes */
#define FEE_CLUSTER_OVERHEAD_SIZE                48U

/** upper layer module Job end notification declare */
#define FEE_NVM_JOB_END_NOTIFICATION_DECLARE

/** upper layer module Job end notification */
#define FEE_NVM_JOB_END_NOTIFICATION

/** upper layer module Job error notification declare */
#define FEE_NVM_JOB_ERROR_NOTIFICATION_DECLARE

/** upper layer module Job error notification */
#define FEE_NVM_JOB_ERROR_NOTIFICATION

/** Enable or Disableto the  Fee_SetMode Api */
#define FEE_SET_MODE_API_ENABLE                  (STD_ON)

/** Defines the project  Assignment configured */
#define FEE_PROJECT_ASSIGNMENT_CONFIG            (STD_OFF)

/** Enable or Disable the Det Error Detect Function */
#define FEE_DEV_ERROR_DETECT_ENABLE              (STD_OFF)

/** Enable the feature that Fee Swap Foreign Block */
#define FEE_SWAP_FOREIGN_BLOCKS_ENABLED          (STD_OFF)

/** virtual page size,logical blocks must be aligned */
#define FEE_VIRTUAL_PAGE_SIZE                    16U

/** Data buffer Size in bytes */
#define FEE_DATA_BUFFER_SIZE                     48U

/** Enable the feature that Fee Mark Empty Blocks INVALID or INCONSISTENT */
#define FEE_MARK_EMPTY_BLOCKS_INVALID_SUPPORT    (STD_ON)

/** upper layer module Job cluster format notification declare */
#define FEE_NVM_CLUSTER_FORMAT_NOTIFICATION_DECLARE

/** upper layer module Job cluster format notification */
#define FEE_NVM_CLUSTER_FORMAT_NOTIFICATION

/** Enable the feature that fee Legacy Immediate Erase mode */
#define FEE_LEGACY_IMMEDIATE_ERASE_MODE_SUPPORT  (STD_OFF)

/** Enable or Disableto the  Fee_GetVersionInfo Api */
#define FEE_GET_VERSION_INFO_API_ENABLE          (STD_ON)

/** Enable the feature thar fee Legacy mode */
#define FEE_LEGACY_MODE_SUPPORT                  (STD_OFF)

/** Maximum number of Fee blocks */
#define FEE_MAX_NUMBER_OF_BLOCKS                 (FEE_CONFIGURED_NUMBER_OF_BLOCKS)

/** Enable the feature thar fee block always available */
#define FEE_BLOCK_ALWAYS_AVAILABLE_SUPPORT       (STD_OFF)

/** Fee cluster groups Number */
#define FEE_CLUSTER_GROUPS_NUMBER                2U

/** configured Fee blocks Number */
#define FEE_CONFIGURED_NUMBER_OF_BLOCKS          3U

/** Configured Fee blocks name */
#define FeeConf_FeeBlockConfiguration_FeeBlockConfiguration_0     1U
#define FeeConf_FeeBlockConfiguration_FeeBlockConfiguration_1     2U
#define FeeConf_FeeBlockConfiguration_FeeBlockConfiguration_2     3U

/** Enable or Disableto the Fee_Cancel Api */
#define FEE_CANCEL_API_ENABLE                    (STD_ON)

/** The default value of flash memory cell after erased */
#define FEE_DEFAULT_VALUE                        0xffU

/** the flag of the block and cluster mark to validation */
#define FEE_VALIDATED_FLAG                       0x81U

/** the flag of the block and cluster mark to invalidation */
#define FEE_INVALIDATED_FLAG                     0x18U

#if (STD_ON == FLASH_ECC_ISR_ENABLE)

#define FEE_ECC_ISR_ENABLE                    (STD_ON)

#define FEE_CLUSTER_SIZE                      0x2000U

#if (STD_ON == FEE_ECC_ISR_ENABLE) 
#define FEE_ECC_ISR_NOTIFICATION() (Fee_EccCompletionNotificaiton())
#endif

#endif
/**@} end of group FEE_Macros */

#define FEE_START_SEC_CONST_UNSPECIFIED
#include "Fee_MemMap.h"

/** @defgroup FEE_Variable
  @{
*/

/** Cluster group Configuration parameter */
extern CONST(Fee_ClusterGroupType, FEE_CONST) Fee_ClrGrps[ FEE_CLUSTER_GROUPS_NUMBER ];

/** Fee blocks Configuration parameter */
extern CONST(Fee_BlkCfgType, FEE_CONST) Fee_BlockConfig[ FEE_CONFIGURED_NUMBER_OF_BLOCKS ];

/**@} end of group FEE_Variable */

#define FEE_STOP_SEC_CONST_UNSPECIFIED
#include "Fee_MemMap.h"

#ifdef __cplusplus
}
#endif

#endif

/**@} end of group FEE_Driver */
/**@} end of group G32A10xx_StdPeriphDriver */

