/*!
* @file     Icu_RegPortCi.h
*
* @version  1.0.0
*
* @brief    Register file of Icu with port driver
*
* @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 ICU_REG_PORT_CI_H
#define ICU_REG_PORT_CI_H

#ifdef __cplusplus
extern "C"{
#endif

#include "Reg_eSys.h"

/** @addtogroup G32A10xx_StdPeriphDriver
  @{
*/

/** @defgroup ICU_Driver
  * @brief ICU driver modules
  @{
*/

/** @defgroup ICU_Macros
  @{
*/
/**************************************************************************
                  VENDOR ID & AUTOSAR VERSION INFO
**************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define ICU_REG_PORT_CI_H_VENDOR_ID                      0x00C1U
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */
#define ICU_REG_PORT_CI_H_AR_RELEASE_MAJOR_VERSION       0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define ICU_REG_PORT_CI_H_AR_RELEASE_MINOR_VERSION       0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define ICU_REG_PORT_CI_H_AR_RELEASE_REVISION_VERSION    0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define ICU_REG_PORT_CI_H_SW_MAJOR_VERSION               0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define ICU_REG_PORT_CI_H_SW_MINOR_VERSION               0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define ICU_REG_PORT_CI_H_SW_PATCH_VERSION               0x00U

/**@} end of group ICU_Macros */

/**************************************************************************
                    VERSION INFOMATION VERIFICATION
**************************************************************************/
#ifdef ENABLE_INTERMODULE_MCAL_CHECK
    /* Make sure the AUTOSAR major version number is the same between Icu_RegPortCi.h and Reg_eSys.h */
    #if (ICU_REG_PORT_CI_H_AR_RELEASE_MAJOR_VERSION != REG_ESYS_H_AR_RELEASE_MAJOR_VERSION)
        #error "AUTOSAR Major Version Number mismatch between Icu_RegPortCi.h and Reg_eSys.h "
    #endif
    /* Make sure the AUTOSAR minor version number is the same between Icu_RegPortCi.h and Reg_eSys.h */
    #if (ICU_REG_PORT_CI_H_AR_RELEASE_MINOR_VERSION != REG_ESYS_H_AR_RELEASE_MINOR_VERSION)
        #error "AUTOSAR Minor Version Number mismatch between Icu_RegPortCi.h and Reg_eSys.h "
    #endif
#endif

/**************************************************************************
                    GLOBAL VARIABLE
**************************************************************************/
#define ICU_START_SEC_CONST_32
#include "Icu_MemMap.h"

/** @defgroup ICU_Variable
  @{
*/

extern CONST(uint32, ICU_CONST) ICU_MODULE_PORT_CI_BASEADDR[6];

/**@} end of group ICU_Variable */

#define ICU_STOP_SEC_CONST_32
#include "Icu_MemMap.h"

/**************************************************************************
                    REGISTER ADDRESS
**************************************************************************/
/** @defgroup ICU_Macros
  @{
*/

/************************************************************
*    PortId Module Register absolute address calculate
*    PortId : 0 to 4
************************************************************/
#define PORT_PORT_ADDR_CALCULATE(PortId, Offset)     (ICU_MODULE_PORT_CI_BASEADDR[(PortId)] + (uint32)(Offset))

/************************************************************
*    This register is used enable/disable digital filter
*    PortId : 0 to 4
************************************************************/
#define ICU_GPIOX_FILTER_EN_ADDR(PortId)              PORT_PORT_ADDR_CALCULATE(PortId, 0x30UL)

/**@} end of group ICU_Macros */

#ifdef __cplusplus
}
#endif

#endif

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