/*!
* @file     WdgIf.c
*
* @version  1.0.0
*
* @brief    This file defines multy function Ptr when WDG hardware have several
*
* @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.
*/

#ifdef __cplusplus
extern "C"{
#endif

#include "WdgIf.h"

#if (1U == WDTIF_DEVICES_NUM)
    #include "Wdg.h"
#endif

/** @addtogroup G32A10xx_StdPeriphDriver
  @{
*/

/** @defgroup WDGIF_Driver
  * @brief WDGIF driver modules
  @{
*/

/** @defgroup WDGIF_Macros
  @{
*/
/**************************************************************************************************
                    VENDOR ID & AUTOSAR VERSION INFO
**************************************************************************************************/
/** Vendor ID (vendorId) of the dedicated implementation of this module according to the AUTOSAR vendor list. */
#define WDGIF_VENDOR_ID                      0x00C1U
/** Major version number of AUTOSAR release on which the appropriate implementation is based on. */
#define WDGIF_AR_RELEASE_MAJOR_VERSION       0x04U
/** Minor version number of AUTOSAR release on which the appropriate implementation is based on. */
#define WDGIF_AR_RELEASE_MINOR_VERSION       0x04U
/** Revision version number of AUTOSAR release on which the appropriate implementation is based on. */
#define WDGIF_AR_RELEASE_REVISION_VERSION    0x00U
/** Major version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define WDGIF_SW_MAJOR_VERSION               0x01U
/** Minor version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define WDGIF_SW_MINOR_VERSION               0x00U
/** Patch level version number of the vendor specific implementation of the module. The numbering is vendor specific. */
#define WDGIF_SW_PATCH_VERSION               0x00U

/**@} end of group WDGIF_Macros */

/**************************************************************************************************
                    VERSION INFOMATION VERIFICATION
**************************************************************************************************/
#if (1U == WDTIF_DEVICES_NUM)
#ifdef ENABLE_INTERMODULE_MCAL_CHECK
     /* Make sure the AUTOSAR major version number is the same between WdgIf.c and Wdg.h */
     #if (WDGIF_AR_RELEASE_MAJOR_VERSION != WDG_H_AR_RELEASE_MAJOR_VERSION)
         #error "AUTOSAR Major Version Number mismatch between WdgIf.c and Wdg.h"
     #endif
     /* Make sure the AUTOSAR minor version number is the same between WdgIf.c and Wdg.h */
     #if (WDGIF_AR_RELEASE_MINOR_VERSION != WDG_H_AR_RELEASE_MINOR_VERSION)
         #error "AUTOSAR Minor Version Number mismatch between WdgIf.c and Wdg.h"
     #endif
#endif
#endif

/* Make sure the vendor id is the same between WdgIf.c and WdgIf.h */
#if (WDGIF_VENDOR_ID != WDGIF_H_VENDOR_ID)
    #error "Vendor id mismatch between WdgIf.c and WdgIf.h"
#endif
/* Make sure the AUTOSAR major version number is the same between WdgIf.c and WdgIf.h */
#if (WDGIF_AR_RELEASE_MAJOR_VERSION != WDGIF_H_AR_RELEASE_MAJOR_VERSION)
    #error "AUTOSAR Major Version Number mismatch between WdgIf.c and WdgIf.h"
#endif
/* Make sure the AUTOSAR minor version number is the same between WdgIf.c and WdgIf.h */
#if (WDGIF_AR_RELEASE_MINOR_VERSION != WDGIF_H_AR_RELEASE_MINOR_VERSION)
    #error "AUTOSAR Minor Version Number mismatch between WdgIf.c and WdgIf.h"
#endif
/* Make sure the AUTOSAR revision version number is the same between WdgIf.c and WdgIf.h */
#if (WDGIF_AR_RELEASE_REVISION_VERSION != WDGIF_H_AR_RELEASE_REVISION_VERSION)
    #error "AUTOSAR Revision Version Number mismatch between WdgIf.c and WdgIf.h"
#endif
/* Make sure the software major version number is the same between WdgIf.c and WdgIf.h */
#if (WDGIF_SW_MAJOR_VERSION != WDGIF_H_SW_MAJOR_VERSION)
    #error "Software Major Version Number mismatch between WdgIf.c and WdgIf.h"
#endif
/* Make sure the software minor version number is the same between WdgIf.c and WdgIf.h */
#if (WDGIF_SW_MINOR_VERSION != WDGIF_H_SW_MINOR_VERSION)
    #error "Software Minor Version Number mismatch between WdgIf.c and WdgIf.h"
#endif
/* Make sure the software patch version number is the same between WdgIf.c and WdgIf.h */
#if (WDGIF_SW_PATCH_VERSION != WDGIF_H_SW_PATCH_VERSION)
    #error "Software Patch Version Number mismatch between WdgIf.c and WdgIf.h"
#endif

/**************************************************************************************************
                    GLOBAL CONSTANT
**************************************************************************************************/
/** @defgroup WDGIF_Variable
  @{
*/

#if (1U == WDTIF_DEVICES_NUM)

const WdtIf_SetModeFuncPtrType WdtIf_SetModeFunctionPtr[WDTIF_DEVICES_NUM] = {&Wdg_SetMode};

const WdtIf_SetTriggerFuncPtrType WdtIf_SetTriggerConditionFunctionPtr[WDTIF_DEVICES_NUM] = 
      {
          &Wdg_SetTriggerCondition
      };
#else
const WdtIf_SetModeFuncPtrType WdtIf_SetModeFunctionPtr[WDTIF_DEVICES_NUM] =
    {
    #if(STD_ON == WDG_INSTANCE0)
            &Wdg_193_Instance0_SetMode
    #else
            NULL_PTR
    #endif
    };

const WdtIf_SetTriggerFuncPtrType WdtIf_SetTriggerConditionFunctionPtr[WDTIF_DEVICES_NUM] =
    {
    #if(STD_ON == WDG_INSTANCE0)
            &Wdg_193_Instance0_SetTriggerCondition
    #else
            NULL_PTR
    #endif
    };
#endif

/**@} end of group WDGIF_Variable */

#ifdef __cplusplus
}
#endif

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