/**
*   @file    Gpt_PBcfg.c
*   
*   @version 1.0.0
*
*   @brief   AUTOSAR Gpt -  GPT driver configuration source file.
*   @details GPT driver source file, containing C and XPath constructs for generating Gpt
*            configuration source file for the Post-build configuration variant.
*
*   @addtogroup GPT_MODULE
*   @{
*/
/*==================================================================================================
*   Project              : AUTOSAR 4.3 MCAL
*   Platform             : PA
*   Peripheral           : eMios_Stm_Pit
*   Dependencies         : none
*
*   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
/**
* @page misra_violations MISRA-C:2012 violations
*
* @section [global]
*     Violates MISRA 2012 Required Rule 5.1, External identifiers shall be distinct. 
*     The used compilers use more than 31 chars for identifiers.
*
* @section [global]
*     Violates MISRA 2012 Required Rule 5.2, Identifiers declared in the same scope and name space
*     shall be distinct.
*     The used compilers use more than 31 chars for identifiers.
*
* @section [global]
*     Violates MISRA 2012 Required Rule 5.4, Macro identifiers shall be distinct.
*     The used compilers use more than 31 chars for identifiers.
*
* @section [global]
*     Violates MISRA 2012 Required Rule 5.5, Identifiers shall be distinct from macro names. 
*     The used compilers use more than 31 chars for identifiers.
*
* @section GPT_PBCFG_C_REF_1
*     Violates MISRA 2012 Required Directive 4.10, Precautions shall be taken in order to prevent
*     the contents of a header file being included more than once.
*     This violation is not fixed since the inclusion of <MA>_MemMap.h is as per AUTOSAR requirement
*     [SWS_MemMap_00003].
*
* @section GPT_PBCFG_C_REF_2
*     Violates MISRA 2012 Advisory Rule 8.7, Functions and objects should not be defined with 
*     external linkage if they are referenced in only one translation unit.
*
* @section GPT_PBCFG_C_REF_3
*     Violates MISRA 2012 Advisory Rule 20.1, #include directives should only be preceded by
*     preprocessor directives or comments.
*     <MA>_MemMap.h is included after each section define in order to set the current memory section
*     as defined by AUTOSAR
*
* @section GPT_PBCFG_C_REF_4
*     Violates MISRA 2012 Advisory Rule 8.9, An object should be defined at block scope if its
*     identifier only appears in a single function.
*     This violation is due to exporting the externally configured initialization structure used
*     by the "<MA>_Init" function.
*
* @section GPT_PBCFG_C_REF_5
*     Violates MISRA 2012 Required Rule 8.5, An external object or function shall be declared once 
*     in one and only one file
*     There is no need to put the declaration into Gpt_Cfg.h and made it accessible for all modules 
*     which includes Gpt.h/Gpt_Cfg.h.
*/
/*==================================================================================================
*                                        INCLUDE FILES
* 1) system and project includes
* 2) needed interfaces from external units
* 3) internal and external interfaces from this unit
==================================================================================================*/
#include "Gpt_Cfg.h"
#include "Gpt.h"
/*==================================================================================================
*                              SOURCE FILE VERSION INFORMATION
==================================================================================================*/
#define GPT_VENDOR_ID_PBCFG_C                      43
#define GPT_AR_RELEASE_MAJOR_VERSION_PBCFG_C       4
#define GPT_AR_RELEASE_MINOR_VERSION_PBCFG_C       3

#define GPT_AR_RELEASE_REVISION_VERSION_PBCFG_C    1
#define GPT_SW_MAJOR_VERSION_PBCFG_C               1
#define GPT_SW_MINOR_VERSION_PBCFG_C               0
#define GPT_SW_PATCH_VERSION_PBCFG_C               0

/*==================================================================================================
*                                     FILE VERSION CHECKS
==================================================================================================*/
#if ( GPT_VENDOR_ID_PBCFG_C != GPT_VENDOR_ID_CFG)
    #error "Gpt_PBcfg.c and Gpt_Cfg.h have different vendor ids"
#endif
/* Check if the header files are of the same Autosar version */
#if ((GPT_AR_RELEASE_MAJOR_VERSION_PBCFG_C != GPT_AR_RELEASE_MAJOR_VERSION_CFG) || \
     (GPT_AR_RELEASE_MINOR_VERSION_PBCFG_C != GPT_AR_RELEASE_MINOR_VERSION_CFG) || \
     (GPT_AR_RELEASE_REVISION_VERSION_PBCFG_C != GPT_AR_RELEASE_REVISION_VERSION_CFG) \
    )
    #error "AutoSar Version Numbers of Gpt_PBcfg.c and Gpt_Cfg.h are different"
#endif
/* Check if the header files are of the same Software version */
#if ((GPT_SW_MAJOR_VERSION_PBCFG_C != GPT_SW_MAJOR_VERSION_CFG) || \
     (GPT_SW_MINOR_VERSION_PBCFG_C != GPT_SW_MINOR_VERSION_CFG) || \
     (GPT_SW_PATCH_VERSION_PBCFG_C != GPT_SW_PATCH_VERSION_CFG)    \
    )
    #error "Software Version Numbers of Gpt_PBcfg.c and Gpt_Cfg.h are different"
#endif

/* Check if Gpt_PBcfg.c file and Gpt.h header file are of the same vendor */
#if (GPT_VENDOR_ID_PBCFG_C != GPT_VENDOR_ID)
    #error "Gpt_PBcfg.c and Gpt.h have different vendor ids"
#endif
/* Check if Gpt_PBcfg.c file and Gpt.h header file are of the same Autosar version */
#if ((GPT_AR_RELEASE_MAJOR_VERSION_PBCFG_C != GPT_AR_RELEASE_MAJOR_VERSION) || \
     (GPT_AR_RELEASE_MINOR_VERSION_PBCFG_C != GPT_AR_RELEASE_MINOR_VERSION) || \
     (GPT_AR_RELEASE_REVISION_VERSION_PBCFG_C != GPT_AR_RELEASE_REVISION_VERSION) \
    )
    #error "AutoSar Version Numbers of Gpt_PBcfg.c and Gpt.h are different"
#endif
/* Check if Gpt_PBcfg.c file and Gpt.h header file are of the same Software version */
#if ((GPT_SW_MAJOR_VERSION_PBCFG_C != GPT_SW_MAJOR_VERSION) || \
     (GPT_SW_MINOR_VERSION_PBCFG_C != GPT_SW_MINOR_VERSION) || \
     (GPT_SW_PATCH_VERSION_PBCFG_C != GPT_SW_PATCH_VERSION))
    #error "Software Version Numbers of Gpt_PBcfg.c and Gpt.h are different"
#endif

/*==================================================================================================
*                                      GLOBAL VARIABLES
==================================================================================================*/
/**
* @{
* @brief The callback functions defined by the user to be called as channel notifications
*/
/** @violates @ref GPT_PBCFG_C_REF_5 MISRA 2012 Required Rule 8.5, An external object or function shall be declared once 
*     in one and only one file.*/
                        extern void SysDal_IntSch_TaskActivationIsr(void);
                        /** @} */
/*==================================================================================================
*                          LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
==================================================================================================*/

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

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

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

/*==================================================================================================
*                                      GLOBAL CONSTANTS
==================================================================================================*/
#define GPT_START_SEC_CONFIG_DATA_UNSPECIFIED
/** @violates @ref GPT_PBCFG_C_REF_1 MISRA 2012 Required Directive 4.10, the contents of a header 
*   file being included more than once.*/
/** @violates @ref GPT_PBCFG_C_REF_3 MISRA 2012 Advisory Rule 20.1, <MA>_MemMap.h is included
*   after each section define in order to set the current memory section as defined by AUTOSAR.*/
#include "Gpt_MemMap.h"



#define GPT_CONF_CHANNELS_PB    1

#if(GPT_PREDEFTIMER_FUNCTIONALITY_API == STD_ON)
/* Predefined timers channels configuration */

/*Predefined timer configuration structure.*/
static CONSTP2CONST(Gpt_HwPredefChannelConfigType, GPT_CONST, GPT_APPL_CONST) Gpt_pInitPredefTimerChannelPB[GPT_HW_PREDEFTIMER_NUM]=
{
    NULL_PTR,
    NULL_PTR,
    NULL_PTR,
    NULL_PTR
};
#endif /*GPT_PREDEFTIMER_FUNCTIONALITY_API == STD_ON*/

/* Channels configuration set.*/
static CONST(Gpt_ChannelConfigType, GPT_CONST) Gpt_InitChannelPB[GPT_CONF_CHANNELS_PB] =
{
    {   /*Default_0 configuration data*/
        (boolean)FALSE, /* Wakeup capability */
        &SysDal_IntSch_TaskActivationIsr, /* Channel notification */
#if ((GPT_WAKEUP_FUNCTIONALITY_API == STD_ON) && (GPT_REPORT_WAKEUP_SOURCE == STD_ON))
        (EcuM_WakeupSourceType)0U, /* Wakeup information */
#endif
        (Gpt_ValueType)(4294967295U), /* Maximum ticks value*/
        (GPT_CH_MODE_CONTINUOUS), /* Timer mode:continous/one-shot */
        {
            (uint8)(PIT_0_CH_0), /* GPT physical channel no. */
            (uint8)(GPT_PIT_MODULE), /* hardware module ID */
            (boolean)TRUE, /* Freeze Enable */
            (uint8)(0U) /* Not used for PIT */
#if (GPT_CHAIN_MODE == STD_ON)
            ,(boolean)(FALSE) /* Chain Mode Enable */
#endif
        }
    }
};

/*PostBuild configuration structure.*/
/** @violates @ref GPT_PBCFG_C_REF_2 MISRA 2012 Advisory Rule 8.7, These functions represent the API 
*   of the driver. External linkage is needed to "export" the API.*/
/** @violates @ref GPT_PBCFG_C_REF_4 MISRA 2012 Advisory Rule 8.9, This violation is due to exporting
*   the externally configured initialization structure used by the "<MA>_Init" function.*/
CONST(Gpt_ConfigType, GPT_CONST)  GptChannelConfigSet_0 =
{
    (Gpt_ChannelType)1U,
    &Gpt_InitChannelPB,
#if(GPT_PREDEFTIMER_FUNCTIONALITY_API == STD_ON)
    Gpt_pInitPredefTimerChannelPB,
#endif 
    /*Hardware to logic channel mapping.*/
    {
        GPT_CHN_NOT_USED, /*mapping of STM_0_CH_0*/
        GPT_CHN_NOT_USED, /*mapping of STM_0_CH_1*/
        GPT_CHN_NOT_USED, /*mapping of STM_0_CH_2*/
        GPT_CHN_NOT_USED, /*mapping of STM_0_CH_3*/
        GPT_CHN_NOT_USED, /*mapping of PIT_0_CH_RTI*/
        GptConf_GptChannelConfiguration_Default_0, /*mapping of PIT_0_CH_0*/
        GPT_CHN_NOT_USED, /*mapping of PIT_0_CH_1*/
        GPT_CHN_NOT_USED, /*mapping of PIT_0_CH_2*/
        GPT_CHN_NOT_USED, /*mapping of PIT_0_CH_3*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_0*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_1*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_2*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_3*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_4*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_5*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_6*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_7*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_8*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_9*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_10*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_11*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_12*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_13*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_14*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_15*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_16*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_17*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_18*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_19*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_20*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_21*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_22*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_0_CH_23*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_0*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_1*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_2*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_3*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_4*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_5*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_6*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_7*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_8*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_9*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_10*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_11*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_12*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_13*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_14*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_15*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_16*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_17*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_18*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_19*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_20*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_21*/
        GPT_CHN_NOT_USED, /*mapping of EMIOS_1_CH_22*/
        GPT_CHN_NOT_USED /*mapping of EMIOS_1_CH_23*/
    }
};

#define GPT_STOP_SEC_CONFIG_DATA_UNSPECIFIED
/** @violates @ref GPT_PBCFG_C_REF_1 MISRA 2012 Required Directive 4.10, the contents of a header 
*   file being included more than once.*/
/** @violates @ref GPT_PBCFG_C_REF_3 MISRA 2012 Advisory Rule 20.1, <MA>_MemMap.h is included
*   after each section define in order to set the current memory section as defined by AUTOSAR.*/
#include "Gpt_MemMap.h"

/*==================================================================================================
*                                      GLOBAL VARIABLES
==================================================================================================*/

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

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

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

#ifdef __cplusplus
}
#endif

/** @} */
