[!CODE!][!//
/**
* @file    Port_Cfg.c
*
* @version 1.0.0
* @brief   AUTOSAR Port - PORT driver configuration.
* @details This file contains the PORT driver precompile configuration.
*
* @addtogroup  Port
* @{
*/
/*=================================================================================================
*   Project              : AUTOSAR 4.3 MCAL
*   Platform             : PA
*   Peripheral           : SIU,IGF
*   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 Port_Cfg_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 
*          Port_MemMap.h is as per AUTOSAR requirement [SWS_MemMap_00003].
*
* @section Port_Cfg_c_REF_2
*          Violates MISRA 2012 Advisory Rule 20.1, #include directives should only be preceded by preprocessor
*          directives or comments. Port_MemMap.h is included after each section define in order to set the current 
*          memory section as defined by AUTOSAR
*
* @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.
*/

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

#include "Port.h"

[!INCLUDE "Port_VersionCheck_Src.m"!][!//
[!NOCODE!][!//
[!/******************************************************************************/!][!//
[!/* Variable used to store Mode selected option                                */!][!//
[!/******************************************************************************/!][!//
[!/* Include package file in order to get valid Pins */!][!//
[!INCLUDE "Cobra55_Resource.m"!][!//
[!ENDNOCODE!][!//
/*=================================================================================================
*                              SOURCE FILE VERSION INFORMATION
=================================================================================================*/
/**
* @brief        Parameters that shall be published within the Port driver header file and also in the
*               module's description file
* @details      The integration of incompatible files shall be avoided.
*
*/
#define PORT_VENDOR_ID_CFG_C                       43
#define PORT_AR_RELEASE_MAJOR_VERSION_CFG_C        4
#define PORT_AR_RELEASE_MINOR_VERSION_CFG_C        3
#define PORT_AR_RELEASE_REVISION_VERSION_CFG_C     1
#define PORT_SW_MAJOR_VERSION_CFG_C                1
#define PORT_SW_MINOR_VERSION_CFG_C                0
#define PORT_SW_PATCH_VERSION_CFG_C                0

/*=================================================================================================
                                      FILE VERSION CHECKS
=================================================================================================*/
/* Check if Port_Cfg.c and Port.h are of the same vendor */
#if (PORT_VENDOR_ID_CFG_C != PORT_VENDOR_ID)
    #error "Port_Cfg.c and Port.h have different vendor ids"
#endif

/* Check if Port_Cfg.c and Port.h file are of the same Autosar version */
#if ((PORT_AR_RELEASE_MAJOR_VERSION_CFG_C != PORT_AR_RELEASE_MAJOR_VERSION)     || \
     (PORT_AR_RELEASE_MINOR_VERSION_CFG_C != PORT_AR_RELEASE_MINOR_VERSION)     || \
     (PORT_AR_RELEASE_REVISION_VERSION_CFG_C != PORT_AR_RELEASE_REVISION_VERSION)  \
    )
   #error "AutoSar Version Numbers of Port_Cfg.c and Port.h are different"
#endif

/* Check if Port_Cfg.c and Port.h are of the same software version */
#if ((PORT_SW_MAJOR_VERSION_CFG_C != PORT_SW_MAJOR_VERSION) || \
     (PORT_SW_MINOR_VERSION_CFG_C != PORT_SW_MINOR_VERSION) || \
     (PORT_SW_PATCH_VERSION_CFG_C != PORT_SW_PATCH_VERSION)    \
    )
    #error "Software Version Numbers of Port_Cfg.c and Port.h are different"
#endif

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


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


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

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


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

#define PORT_START_SEC_CONFIG_DATA_16
/** @violates @ref Port_Cfg_c_REF_1 Precautions shall be taken in order to prevent the contents of a header file being included more than once. */
#include "Port_MemMap.h"

#if (STD_ON == PORT_SET_PIN_MODE_API)
[!IF "((ecu:get('PortPackage'))='Port_mapbga416')"!][!//

/** @brief Port Pin description data */
CONST (uint16, PORT_CONST) Port_au16PinDescription[[!"ecu:get('PortPadModeNumber')"!]][[!"ecu:get('PortPin16BlocksNo')"!]] =
{
[!"$CHECK_1"!]
};
[!ELSE!][!//
/** @brief Port Pin description data */
CONST (uint16, PORT_CONST) Port_au16PinDescription[[!"ecu:get('PortPadModeNumber')"!]][[!"ecu:get('PortPin16BlocksNo')"!]] =
{
[!"$CHECK_2"!]
};
[!ENDIF!][!//
#endif /* PORT_SET_PIN_MODE_API */

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

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

#if (STD_ON == PORT_SET_PIN_MODE_API)
[!IF "((ecu:get('PortPackage'))='Port_mapbga416')"!][!//

/** @brief Port Mux settings data (for pads that do not require setting of Inmux register) */
CONST(Port_PinDirectionType,  PORT_CONST) Port_aPadFunctMuxSettings[[!"$SIZE_OF_MUX_TABLE_1"!]] =
{
[!"$MUX_1"!]
};

/** @brief Port Inmux settings data (for pads that do require setting of Inmux register) */
CONST(Port_InMuxSettingType,  PORT_CONST) Port_aPadFunctInMuxSettings[[!"$SIZE_OF_INMUX_TABLE_1"!]] = 
{
[!"$INMUX_1"!]
};

/** @brief Pad index data to either Mux settings table or Inmux settings table */
CONST(Port_SettingsIndexType, PORT_CONST) Port_aPadFunctIndex[PORT_INDEX_TABLE_NUM_ENTRIES_U16] =
{
[!"$INDEX_1"!]
};

[!ELSE!][!//

/** @brief Port Mux settings data (for pads that do not require setting of Inmux register) */
CONST(Port_PinDirectionType,  PORT_CONST) Port_aPadFunctMuxSettings[[!"$SIZE_OF_MUX_TABLE_2"!]] =
{
[!"$MUX_2"!]
};

/** @brief Port Inmux settings data (for pads that do require setting of Inmux register) */
CONST(Port_InMuxSettingType,  PORT_CONST) Port_aPadFunctInMuxSettings[[!"$SIZE_OF_INMUX_TABLE_2"!]] =
{
[!"$INMUX_2"!]
};

/** @brief Pad index data to either Mux settings table or Inmux settings table */
CONST(Port_SettingsIndexType, PORT_CONST) Port_aPadFunctIndex[PORT_INDEX_TABLE_NUM_ENTRIES_U16] = 
{
[!"$INDEX_2"!]
};

[!ENDIF!][!//
#endif /* PORT_SET_PIN_MODE_API */


#define PORT_STOP_SEC_CONFIG_DATA_UNSPECIFIED
/** @violates @ref Port_Cfg_c_REF_1 Precautions shall be taken in order to prevent the contents of a header file being included more than once. */
/** @violates @ref Port_Cfg_c_REF_2 #include directives should only be preceded by preprocessor directives or comments. */
#include "Port_MemMap.h"
/*=================================================================================================
*                                      GLOBAL VARIABLES
=================================================================================================*/


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


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

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

#ifdef __cplusplus
}
#endif
/** @} */

/* End of File */

[!ENDCODE!][!//
