/**
 *   @file    WdgIf.c
 *   @implements        Wdg_HLD_unit
 *   @version 1.0.0
 *
 *   @brief   AUTOSAR WdgIf high level code.
*            This file contains sample code only. It is not part of the production code deliverables.
 *
 *   @addtogroup WDG_MODULE
 *   @{
 */
/*=================================================================================================
*   Project              : AUTOSAR 4.3 MCAL
*   Platform             : PA
*   Peripheral           : generic
*   Dependencies         : 
*
*   Autosar Version      : 4.3.1
*   Autosar Revision     : ASR_REL_4_3_REV_0001
*   Autosar Conf.Variant :
*   SW Version           : 1.0.0
*   Build Version        : MPC5777C_MCAL_1_0_0_RTM_ASR_REL_4_3_REV_0001_20190315
*
*   (c) Copyright 2006-2016 Freescale Semiconductor, Inc. 
*       Copyright 2017-2019 NXP
*   All Rights Reserved.
=================================================================================================*/
/*=================================================================================================
=================================================================================================*/

#ifdef __cplusplus
extern "C"{
#endif




/*=================================================================================================
*                                        INCLUDE FILES
* 1) system and project includes
* 2) needed interfaces from external units
* 3) internal and external interfaces from this unit
=================================================================================================*/


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

#if (WDGIF_NUMBER_OF_DEVICES != 1U)     
#ifdef WDG_INSTANCE0     
#if (WDG_INSTANCE0 == STD_ON)
    #include "Wdg_43_Instance0.h"
#endif
#endif

#ifdef WDG_INSTANCE1
#if (WDG_INSTANCE1 == STD_ON)
    #include "Wdg_43_Instance1.h"
#endif
#endif

#ifdef WDG_INSTANCE2
#if (WDG_INSTANCE2 == STD_ON)
    #include "Wdg_43_Instance2.h"
#endif
#endif

#ifdef WDG_INSTANCE3
#if (WDG_INSTANCE3 == STD_ON)
    #include "Wdg_43_Instance3.h"
#endif
#endif

#ifdef WDG_INSTANCE4
#if (WDG_INSTANCE4 == STD_ON)
    #include "Wdg_43_Instance4.h"
#endif
#endif

#ifdef WDG_INSTANCE5
#if (WDG_INSTANCE5 == STD_ON)
    #include "Wdg_43_Instance5.h"
#endif
#endif

#ifdef WDG_INSTANCE6
#if (WDG_INSTANCE6 == STD_ON)
    #include "Wdg_43_Instance6.h"
#endif
#endif

#ifdef WDG_INSTANCE7
#if (WDG_INSTANCE7 == STD_ON)
    #include "Wdg_43_Instance7.h"
#endif
#endif

#ifdef WDG_INSTANCE8
#if (WDG_INSTANCE8 == STD_ON)
    #include "Wdg_43_Instance8.h"
#endif
#endif

#ifdef WDG_INSTANCE9
#if (WDG_INSTANCE9 == STD_ON)
    #include "Wdg_43_Instance9.h"
#endif
#endif

#ifdef WDG_INSTANCE10
#if (WDG_INSTANCE10 == STD_ON)
    #include "Wdg_43_Instance10.h"
#endif
#endif

#endif

/*=================================================================================================
*                              SOURCE FILE VERSION INFORMATION
=================================================================================================*/

#define WDGIF_VENDOR_ID_C                      43
#define WDGIF_AR_RELEASE_MAJOR_VERSION_C       4
#define WDGIF_AR_RELEASE_MINOR_VERSION_C       3
/** @violates @ref WdgIf_C_REF_1 The compiler/linker shall be checked to ensure that 31
    character significance and case sensitivity are supported for external identifiers. */
#define WDGIF_AR_RELEASE_REVISION_VERSION_C    1
#define WDGIF_SW_MAJOR_VERSION_C               1
#define WDGIF_SW_MINOR_VERSION_C               0
#define WDGIF_SW_PATCH_VERSION_C               0

/*=================================================================================================
*                                     FILE VERSION CHECKS
=================================================================================================*/
#if ((WDGIF_AR_RELEASE_MAJOR_VERSION_C != WDG_CHANNEL_AR_RELEASE_MAJOR_VERSION)  ||   \
     (WDGIF_AR_RELEASE_MINOR_VERSION_C != WDG_CHANNEL_AR_RELEASE_MINOR_VERSION)  ||   \
     (WDGIF_AR_RELEASE_REVISION_VERSION_C != WDG_CHANNEL_AR_RELEASE_REVISION_VERSION) \
    )
    #error "AUTOSAR Version Numbers of WdgIf.c and Wdg.h are different"
#endif

#if ((WDGIF_SW_MAJOR_VERSION_C != WDG_SW_MAJOR_VERSION) || \
     (WDGIF_SW_MINOR_VERSION_C != WDG_SW_MINOR_VERSION) || \
     (WDGIF_SW_PATCH_VERSION_C != WDG_SW_PATCH_VERSION)    \
    )
    #error "Software Version Numbers of WdgIf.c and Wdg.h are different"
#endif

#if (WDGIF_VENDOR_ID_C != WDG_VENDOR_ID)
    #error "VENDOR ID for WdgIf.c and Wdg.h is different"
#endif



/* Check if current file and WDGIF header file are of the same vendor.*/
#if (WDGIF_VENDOR_ID_C != WDGIF_VENDOR_ID)
    #error "WdgIf.c and WdgIf.h have different vendor ids"
#endif

/* Check if current file and WDGIF header file are of the same Autosar version.*/
#if ((WDGIF_AR_RELEASE_MAJOR_VERSION_C    != WDGIF_AR_RELEASE_MAJOR_VERSION) || \
     (WDGIF_AR_RELEASE_MINOR_VERSION_C    != WDGIF_AR_RELEASE_MINOR_VERSION) || \
     (WDGIF_AR_RELEASE_REVISION_VERSION_C != WDGIF_AR_RELEASE_REVISION_VERSION) \
    )
    #error "AutoSar Version Numbers of WdgIf.c and WdgIf.h are different"
#endif

/* Check if current file and WDGIF header file are of the same Software version.*/
#if ((WDGIF_SW_MAJOR_VERSION_C != WDGIF_SW_MAJOR_VERSION) || \
     (WDGIF_SW_MINOR_VERSION_C != WDGIF_SW_MINOR_VERSION) || \
     (WDGIF_SW_PATCH_VERSION_C != WDGIF_SW_PATCH_VERSION)    \
    )
    #error "Software Version Numbers of WdgIf.c and WdgIf.h are different"
#endif

/*=================================================================================================
*                          LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
=================================================================================================*/


/*=================================================================================================
*                                       LOCAL MACROS
=================================================================================================*/


/*=================================================================================================
*                                      LOCAL CONSTANTS
=================================================================================================*/


/*=================================================================================================
*                                      LOCAL VARIABLES
=================================================================================================*/


/*=================================================================================================
*                                      GLOBAL CONSTANTS
=================================================================================================*/
#if (WDGIF_NUMBER_OF_DEVICES == 1U) 
const WdgIf_SetModeFctPtrType WdgIf_SetModeFctPtr[WDGIF_NUMBER_OF_DEVICES] =
    {
        Wdg_SetMode
    };
    
const WdgIf_SetTriggerFctPtrType WdgIf_SetTriggerConditionFctPtr[WDGIF_NUMBER_OF_DEVICES] =
    {
        Wdg_SetTriggerCondition
    };
#else
const WdgIf_SetModeFctPtrType WdgIf_SetModeFctPtr[WDGIF_NUMBER_OF_DEVICES] =
    {
    #if(WDG_INSTANCE0 == STD_ON)
            Wdg_43_Instance0_SetMode
            #else
            NULL_PTR
        #endif
    #if (WDGIF_NUMBER_OF_DEVICES>1)
        #ifdef WDG_INSTANCE1
            #if(WDG_INSTANCE1 == STD_ON)
            ,Wdg_43_Instance1_SetMode
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>2)
        #ifdef WDG_INSTANCE2
            #if(WDG_INSTANCE2 == STD_ON)
            ,Wdg_43_Instance2_SetMode
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>3)
        #ifdef WDG_INSTANCE3
            #if(WDG_INSTANCE3 == STD_ON)
            ,Wdg_43_Instance3_SetMode
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>4)
        #ifdef WDG_INSTANCE4
            #if(WDG_INSTANCE4 == STD_ON)
            ,Wdg_43_Instance4_SetMode
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>5)
        #ifdef WDG_INSTANCE5
            #if(WDG_INSTANCE5 == STD_ON)
            ,Wdg_43_Instance5_SetMode
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>6)
        #ifdef WDG_INSTANCE6
            #if(WDG_INSTANCE6 == STD_ON)
            ,Wdg_43_Instance6_SetMode
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>7)
        #ifdef WDG_INSTANCE7
            #if(WDG_INSTANCE7 == STD_ON)
            ,Wdg_43_Instance7_SetMode
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>8)
        #ifdef WDG_INSTANCE8
            #if(WDG_INSTANCE8 == STD_ON)
            ,Wdg_43_Instance8_SetMode
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>9)
        #ifdef WDG_INSTANCE9
            #if(WDG_INSTANCE9 == STD_ON)
            ,Wdg_43_Instance9_SetMode
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>10)
        #ifdef WDG_INSTANCE10
            #if(WDG_INSTANCE10 == STD_ON)
            ,Wdg_43_Instance10_SetMode
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    };
    
    
const WdgIf_SetTriggerFctPtrType WdgIf_SetTriggerConditionFctPtr[WDGIF_NUMBER_OF_DEVICES] =
    {
    #if(WDG_INSTANCE0 == STD_ON)
            Wdg_43_Instance0_SetTriggerCondition
            #else
            NULL_PTR
        #endif
    #if (WDGIF_NUMBER_OF_DEVICES>1)
        #ifdef WDG_INSTANCE1
            #if(WDG_INSTANCE1 == STD_ON)
            ,Wdg_43_Instance1_SetTriggerCondition
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>2)
        #ifdef WDG_INSTANCE2
            #if(WDG_INSTANCE2 == STD_ON)
            ,Wdg_43_Instance2_SetTriggerCondition
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>3)
        #ifdef WDG_INSTANCE3
            #if(WDG_INSTANCE3 == STD_ON)
            ,Wdg_43_Instance3_SetTriggerCondition
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>4)
        #ifdef WDG_INSTANCE4
            #if(WDG_INSTANCE4 == STD_ON)
            ,Wdg_43_Instance4_SetTriggerCondition
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>5)
        #ifdef WDG_INSTANCE5
            #if(WDG_INSTANCE5 == STD_ON)
            ,Wdg_43_Instance5_SetTriggerCondition
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>6)
        #ifdef WDG_INSTANCE6
            #if(WDG_INSTANCE6 == STD_ON)
            ,Wdg_43_Instance6_SetTriggerCondition
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>7)
        #ifdef WDG_INSTANCE7
            #if(WDG_INSTANCE7 == STD_ON)
            ,Wdg_43_Instance7_SetTriggerCondition
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>8)
        #ifdef WDG_INSTANCE8
            #if(WDG_INSTANCE8 == STD_ON)
            ,Wdg_43_Instance8_SetTriggerCondition
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>9)
        #ifdef WDG_INSTANCE9
            #if(WDG_INSTANCE9 == STD_ON)
            ,Wdg_43_Instance9_SetTriggerCondition
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    #if (WDGIF_NUMBER_OF_DEVICES>10)
        #ifdef WDG_INSTANCE10
            #if(WDG_INSTANCE10 == STD_ON)
            ,Wdg_43_Instance10_SetTriggerCondition
            #else
            ,NULL_PTR
            #endif
        #endif
    #endif
    };
#endif
/*=================================================================================================
*                                      GLOBAL VARIABLES
=================================================================================================*/


/*=================================================================================================
*                                   LOCAL FUNCTION PROTOTYPES
=================================================================================================*/


/*=================================================================================================
*                                       LOCAL FUNCTIONS
=================================================================================================*/

/*=================================================================================================
*                                       GLOBAL FUNCTIONS
=================================================================================================*/


#ifdef __cplusplus
}
#endif

/** @} */
