/**
*   @file       Ocu_PBcfg.c
*   @implements Ocu_PBcfg.c_Artifact
*   @version    1.0.0
*
*   @brief      AUTOSAR Ocu - Ocu post-build configuration file.
*   @details    Post-build configuration structure instances.
*
*   @addtogroup OCU_MODULE
*   @{
*/
/*==================================================================================================
*   Project              : AUTOSAR 4.3 MCAL
*   Platform             : PA
*   Peripheral           : eMios
*   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 Ocu_PBcfg_C_REF_1
* Violates MISRA 2012 Required Rule 4.10, Precautions shall be taken in order to prevent the contents of a header file 
* being included more than once
*
* @section Ocu_PBcfg_C_REF_2
* 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 Ocu_PBcfg_C_REF_3
* Violates MISRA 2012 Advisory Rule 2.5, A project should not contain unused define declarations.
*
* @section Ocu_PBcfg_C_REF_4
* 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.
* External linkage is needed to "export" the configuration structure to driver high layer.
*
* @section Ocu_PBcfg_C_REF_5
* Violates MISRA 2012 Required Rule 8.5, Functions and objects shall be declared once in one and only one file 
* Declaration of notification functions might be multiple existing in multiple configuration variants
*
* @section Ocu_PBcfg_C_REF_6
* Violates MISRA 2012 Required Rule 8.4, A compatible declaration shall be visible when an object or function 
* with external linkage is defined. 
*
* @section Ocu_PBcfg_C_REF_7
* Violates MISRA 2012 Advisory Rule 8.9, An object should be defined at block scope if its identifier only appears 
* in a single function.
* For generated configuration structures: This violation is due to exporting the externally configured initialization
* structure used by the "<MA>_Init" function.
*/

/*==================================================================================================
*                                         INCLUDE FILES
* 1) system and project includes
* 2) needed interfaces from external units
* 3) internal and external interfaces from this unit
==================================================================================================*/
#include "Ocu.h"

#include "Reg_eSys_eMios.h"

/*==================================================================================================
*                               SOURCE FILE VERSION INFORMATION
==================================================================================================*/
/**
* @{
* @file           Ocu_PBcfg.c
*/
#define OCU_PBCFG_VENDOR_ID_C                      43

/**@violates @ref Ocu_PBcfg_C_REF_3
* Violates Advisory Rule 2.5, A project should not contain unused define declarations.
*/
#define OCU_PBCFG_MODULE_ID_C                      125
#define OCU_PBCFG_AR_RELEASE_MAJOR_VERSION_C       4
#define OCU_PBCFG_AR_RELEASE_MINOR_VERSION_C       3
#define OCU_PBCFG_AR_RELEASE_REVISION_VERSION_C    1

#define OCU_PBCFG_SW_MAJOR_VERSION_C               1
#define OCU_PBCFG_SW_MINOR_VERSION_C               0
#define OCU_PBCFG_SW_PATCH_VERSION_C               0
/**@}*/

/*==================================================================================================
*                                      FILE VERSION CHECKS
==================================================================================================*/
#if (OCU_PBCFG_VENDOR_ID_C != OCU_VENDOR_ID)
    #error "Ocu_PBcfg.c and Ocu.h have different vendor ids"
#endif

#if ((OCU_PBCFG_AR_RELEASE_MAJOR_VERSION_C != OCU_AR_RELEASE_MAJOR_VERSION) || \
     (OCU_PBCFG_AR_RELEASE_MINOR_VERSION_C != OCU_AR_RELEASE_MINOR_VERSION) || \
     (OCU_PBCFG_AR_RELEASE_REVISION_VERSION_C != OCU_AR_RELEASE_REVISION_VERSION))
    #error "AutoSar Version Numbers of Ocu_PBcfg.c and Ocu.h are different"
#endif

#if ((OCU_PBCFG_SW_MAJOR_VERSION_C != OCU_SW_MAJOR_VERSION) || \
     (OCU_PBCFG_SW_MINOR_VERSION_C != OCU_SW_MINOR_VERSION)  || \
     (OCU_PBCFG_SW_PATCH_VERSION_C != OCU_SW_PATCH_VERSION))
    #error "Software Version Numbers of Ocu_PBcfg.c and Ocu.h are different"
#endif

#ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
    #if (OCU_PBCFG_VENDOR_ID_C != REG_ESYS_EMIOS_VENDOR_ID)
        #error "Ocu_PBcfg.c and Reg_eSys_eMios.h have different vendor ids"
    #endif

    #if ((OCU_PBCFG_AR_RELEASE_MAJOR_VERSION_C != REG_ESYS_EMIOS_AR_RELEASE_MAJOR_VERSION) || \
         (OCU_PBCFG_AR_RELEASE_MINOR_VERSION_C != REG_ESYS_EMIOS_AR_RELEASE_MINOR_VERSION) || \
         (OCU_PBCFG_AR_RELEASE_REVISION_VERSION_C != REG_ESYS_EMIOS_AR_RELEASE_REVISION_VERSION ))
        #error "AutoSar Version Numbers of Ocu_PBcfg.c and Reg_eSys_eMios.h are different"
    #endif

    #if ((OCU_PBCFG_SW_MAJOR_VERSION_C != REG_ESYS_EMIOS_SW_MAJOR_VERSION) || \
         (OCU_PBCFG_SW_MINOR_VERSION_C != REG_ESYS_EMIOS_SW_MINOR_VERSION) || \
         (OCU_PBCFG_SW_PATCH_VERSION_C != REG_ESYS_EMIOS_SW_PATCH_VERSION))
        #error "Software Version Numbers of Ocu_PBcfg.c and Reg_eSys_eMios.h are different"
    #endif
#endif


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

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

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

/*==================================================================================================
*                                       GLOBAL CONSTANTS
==================================================================================================*/

#define OCU_START_SEC_CONFIG_DATA_UNSPECIFIED
/**@violates @ref Ocu_PBcfg_C_REF_1 Precautions shall be taken in order to prevent the contents 
   of a header file being included more than once */
/**@violates @ref Ocu_PBcfg_C_REF_2 #include directives should only be preceded by preprocessor directives or comments. */
#include "Ocu_MemMap.h"

/** 
* @brief Number of configured Ocu channels 
*/
#define OCU_CONF_CHANNELS_PB           1

/** 
* @brief Number of configured EMIOS channels
*/
#define OCU_EMIOS_CONF_CHANNELS_PB     1

/* @brief Configurations for Ocu channels using EMIOS 
 */
static CONST(Ocu_eMios_ChannelConfigType, OCU_CONST) Ocu_eMios_ChannelConfig_PB[OCU_EMIOS_CONF_CHANNELS_PB] =
{
       
    /* @brief OcuChannel_0 -> EMIOS_1_CH_0 */
    {
        /** @brief Ocu Hw Channel */
        EMIOS_1_CH_0,
        /** @brief Ocu Default treshold: 10 */
        (uint32)0x0000000aU,
        /** @brief Ocu max counter value: 16777215  */
        (uint32)0x00ffffffU,
        /** @brief eMios Control Value */
        (Ocu_eMios_ControlType)
        (
            (Ocu_eMios_ControlType)((Ocu_eMios_ControlType)EMIOS_BUS_INTERNAL_COUNTER << OCU_EMIOS_BUS_SELECT_PARAM_SHIFT) | /* Counter select bits for the given channel */
            (Ocu_eMios_ControlType)((Ocu_eMios_ControlType)(OCU_EMIOS_OUTPUT_ENABLE) << OCU_EMIOS_OUTPIN_USED_SHIFT) |  /* Output Pin Enable and default state */
            (Ocu_eMios_ControlType)0 |  /* Output Pin default action */
            (Ocu_eMios_ControlType)((Ocu_eMios_ControlType)CCR_FREN_DISABLE_U32 << OCU_EMIOS_DBG_INFO_SHIFT) |  /* Timer debug config */
            (Ocu_eMios_ControlType)((Ocu_eMios_ControlType)OCU_UPCOUNTING << OCU_EMIOS_COUNT_DIR_SHIFT) |  /*Timer count direction */
            (Ocu_eMios_ControlType)((Ocu_eMios_ControlType)EMIOS_PRESCALER_DIVIDE_1 << OCU_EMIOS_CLOCK_DIV_SHIFT)  /* Timer clock prescaler configuration */    
        ),
        /** @brief Ocu Hw Channel of counter BUS */
        EMIOS_1_CH_0, 
    }
};
/**
@brief EMIOS IP configuration
*/
static CONST(Ocu_eMios_IpConfigType, OCU_CONST) Ocu_eMios_IpConfig_PB
=
{
    /** @brief Number of EMIOS channels in the Ocu configuration */
    (uint8)1,
    /** @brief Pointer to the array of EMIOS enabled Ocu channel configurations */
    &Ocu_eMios_ChannelConfig_PB
};
/**@violates @ref Ocu_PBcfg_C_REF_5 Rule 8.5, Functions and objects shall be declared once in one and only one file  */
extern FUNC (void, OCU_CODE) IoDal_Ani_AdcSwTriggerTable(void);

/* @brief Array of configured Ocu channels */
static CONST(Ocu_ChannelConfigType, OCU_CONST) Ocu_Channels_PB
[OCU_CONF_CHANNELS_PB] =
{
    /* @brief OcuChannel_0 */
    {    
        /* @brief OcuOuptutPinUsed */
        (boolean)TRUE,
#if (OCU_NOTIFICATION_SUPPORTED == STD_ON)
        /** @brief Ocu notification function */
                &IoDal_Ani_AdcSwTriggerTable
#endif

    }
};
/**
@brief   Ocu channels IP related configuration array
*/
static CONST(Ocu_IpChannelConfigType, OCU_CONST) Ocu_IpChannelConfig_PB
[OCU_CONF_CHANNELS_PB] =
{
    /** @brief OcuChannel_0 */
    {
        /* @brief Index in the configuration table of the EMIOS channels */
        (uint8)0,
    }
};
#if (OCU_NOTIFICATION_SUPPORTED == STD_ON)
static CONST(Ocu_ChannelType, OCU_CONST)  Ocu_InitHWMap_PB[OCU_HW_CHANNELS_NO]=
    /** @brief Hw to logic channel map. Array containing a number of elements
    equal to total number of available channels on EMIOS IPV */
    {
        /* Idx of channels 0 - 31 of eMios Module 0 in the array of logic Ocu channels */
        (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255,
        /* Idx of channels 0 - 31 of eMios Module 1 in the array of logic Ocu channels */
        (Ocu_ChannelType)0, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255, (Ocu_ChannelType)255,
    };
#endif /* (OCU_NOTIFICATION_SUPPORTED == STD_ON) */  
/**
@brief   Ocu high level configuration structure
*/
/**@violates @ref Ocu_PBcfg_C_REF_4 Functions and objects should not be defined with external linkage if
* they are referenced in only one translation unit.
*/
CONST(Ocu_ConfigType, OCU_CONST) OcuConfigSet_0=
{
    /** @brief Number of configured Ocu channels */
    (Ocu_ChannelType)OCU_CONF_CHANNELS_PB,
    /** @brief Pointer to array of Ocu channels */
    &Ocu_Channels_PB
,
    /** @brief IP specific configuration */
    {
        /* @brief Pointer to the structure containing EMIOS configuration */
        &Ocu_eMios_IpConfig_PB
,
        /* @brief Pointer to Array containing channe IP related information */
        &Ocu_IpChannelConfig_PB
    }
#if (OCU_NOTIFICATION_SUPPORTED == STD_ON)
    ,
    &Ocu_InitHWMap_PB
#endif /* (OCU_NOTIFICATION_SUPPORTED == STD_ON) */  
};
#define OCU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
/**@violates @ref Ocu_PBcfg_C_REF_1 Precautions shall be taken in order to prevent the contents 
   of a header file being included more than once */
/**@violates @ref Ocu_PBcfg_C_REF_2 #include directives should only be preceded by preprocessor directives or comments. */
#include "Ocu_MemMap.h"


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

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

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

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


#ifdef __cplusplus
}
#endif

/** @} */

