[!
var functionalGroupName = this[1].getName();
var variantName = useFgInfix() ? ("_" + functionalGroupName + "_") : "_";
var configSet = this[0];
var functionalGroupsList = this[2];
var PortGeneral = configSet.getChildById("PortGeneral");
var PortConfigSet = configSet.getChildById("PortConfigSet");
var PortContainer = PortConfigSet.getChildById("PortContainer");
var UnTouchPortPin = PortConfigSet.getChildById("UnTouchedPortPin");
var UnTouchedIMCR = PortConfigSet.getChildById("UntouchedIMCR");
var exprContext = new ExpressionProvider(this[0]);
var PortDerivative = FeatureGetValue(exprContext, "FEATURE_PORT_DERIVATIVE");
/* Array to store configured pin in PortPin */
var configuredPinsArr = [];
var mapDerivativeWithPinMap = {
"s32k312": PinMap_S32K312,
"s32k314": PinMap_S32K3x4,
"s32k324": PinMap_S32K3x4,
"s32k344": PinMap_S32K3x4,
"s32k342": PinMap_S32K342,
"s32k341": PinMap_S32K342,
"s32k322": PinMap_S32K342,
"s32k396": PinMap_S32K396,
"s32k394": PinMap_S32K396, /* S32K394: sub/phantom derivatives of S32K396 */
"s32k358": PinMap_S32K328_S32K338_S32K348_S32K358,
"s32k328": PinMap_S32K328_S32K338_S32K348_S32K358, /* S32K328: sub/phantom derivatives of S32K358 */
"s32k338": PinMap_S32K328_S32K338_S32K348_S32K358, /* S32K338: sub/phantom derivatives of S32K358 */
"s32k348": PinMap_S32K328_S32K338_S32K348_S32K358, /* S32K348: sub/phantom derivatives of S32K358 */
"s32k388": PinMap_S32K388,
"s32k311": PinMap_S32K311,
"s32k310": PinMap_S32K311, /* S32K310: sub/phantom derivatives of S32K311 */
"s32m276": PinMap_S32M276,
"s32m274": PinMap_S32M276 /* S32M274: sub/phantom derivatives of S32M27x */
};
!]
/*==================================================================================================
* Project : RTD AUTOSAR 4.7
* Platform : CORTEXM
* Peripheral : SIUL2
* Dependencies : none
*
* Autosar Version : 4.7.0
* Autosar Revision : ASR_REL_4_7_REV_0000
* Autosar Conf.Variant :
* SW Version : 3.0.0
* Build Version : S32K3_RTD_3_0_0_P07_D2306_ASR_REL_4_7_REV_0000_20230629
*
* Copyright 2020 - 2023 NXP Semiconductors
*
* NXP Confidential. This software is owned or controlled by NXP and may only be
* used strictly in accordance with the applicable license terms. By expressly
* accepting such terms or by downloading, installing, activating and/or otherwise
* using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms. If you do not agree to be
* bound by the applicable license terms, then you may not retain, install,
* activate or otherwise use the software.
==================================================================================================*/
/**
* @file Siul2_Port_Ip[!$variantName$
!]PBcfg.c
*
* @addtogroup Port_CFG
* @{
*/
#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 "Siul2_Port_Ip.h"
/*==================================================================================================
* SOURCE FILE VERSION INFORMATION
==================================================================================================*/
#define SIUL2_PORT_IP_VENDOR_ID[!$variantName$
!]PBCFG_C 43
#define SIUL2_PORT_IP_AR_RELEASE_MAJOR_VERSION[!$variantName$
!]PBCFG_C 4
#define SIUL2_PORT_IP_AR_RELEASE_MINOR_VERSION[!$variantName$
!]PBCFG_C 7
#define SIUL2_PORT_IP_AR_RELEASE_REVISION_VERSION[!$variantName$
!]PBCFG_C 0
#define SIUL2_PORT_IP_SW_MAJOR_VERSION[!$variantName$
!]PBCFG_C 3
#define SIUL2_PORT_IP_SW_MINOR_VERSION[!$variantName$
!]PBCFG_C 0
#define SIUL2_PORT_IP_SW_PATCH_VERSION[!$variantName$
!]PBCFG_C 0
/*==================================================================================================
* FILE VERSION CHECKS
==================================================================================================*/
/* Check if Siul2_Port_Ip[!$variantName$
!]PBcfg.c and Siul2_Port_Ip.h are of the same vendor */
#if (SIUL2_PORT_IP_VENDOR_ID[!$variantName$
!]PBCFG_C != SIUL2_PORT_IP_VENDOR_ID_H)
#error "Siul2_Port_Ip[!$variantName$
!]PBcfg.c and Siul2_Port_Ip.h have different vendor ids"
#endif
/* Check if Siul2_Port_Ip[!$variantName$
!]PBcfg.c and Siul2_Port_Ip.h are of the same Autosar version */
#if ((SIUL2_PORT_IP_AR_RELEASE_MAJOR_VERSION[!$variantName$
!]PBCFG_C != SIUL2_PORT_IP_AR_RELEASE_MAJOR_VERSION_H) || \\\
(SIUL2_PORT_IP_AR_RELEASE_MINOR_VERSION[!$variantName$
!]PBCFG_C != SIUL2_PORT_IP_AR_RELEASE_MINOR_VERSION_H) || \\\
(SIUL2_PORT_IP_AR_RELEASE_REVISION_VERSION[!$variantName$
!]PBCFG_C != SIUL2_PORT_IP_AR_RELEASE_REVISION_VERSION_H) \\\
)
#error "AutoSar Version Numbers of Siul2_Port_Ip[!$variantName$
!]PBcfg.c and Siul2_Port_Ip.h are different"
#endif
/* Check if Siul2_Port_Ip[!$variantName$
!]PBcfg.c and Siul2_Port_Ip.h are of the same software version */
#if ((SIUL2_PORT_IP_SW_MAJOR_VERSION[!$variantName$
!]PBCFG_C != SIUL2_PORT_IP_SW_MAJOR_VERSION_H) || \\\
(SIUL2_PORT_IP_SW_MINOR_VERSION[!$variantName$
!]PBCFG_C != SIUL2_PORT_IP_SW_MINOR_VERSION_H) || \\\
(SIUL2_PORT_IP_SW_PATCH_VERSION[!$variantName$
!]PBCFG_C != SIUL2_PORT_IP_SW_PATCH_VERSION_H) \\\
)
#error "Software Version Numbers of Siul2_Port_Ip[!$variantName$
!]PBcfg.c and Siul2_Port_Ip.h are different"
#endif
/*==================================================================================================
* LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
==================================================================================================*/
/*==================================================================================================
* LOCAL MACROS
==================================================================================================*/
/*==================================================================================================
* LOCAL CONSTANTS
==================================================================================================*/
/*==================================================================================================
* LOCAL VARIABLES
==================================================================================================*/
/*==================================================================================================
* GLOBAL CONSTANTS
==================================================================================================*/
/*==================================================================================================
* GLOBAL VARIABLES
==================================================================================================*/
#define PORT_START_SEC_CONFIG_DATA_UNSPECIFIED
#include "Port_MemMap.h"
[!
function GetAltConf_IP(Derivative, PortPin){
var PinMode = PortPin.getChildById("PortPinMode").getValue();
var mscrId = PortPin.getChildById("PortPinPcr").getValue();
var OutPinAltFunc_IP = 0;
if (PinMode == "GPIO") {
OutPinAltFunc_IP = 0;
}
else {
PinMode = "PORT" + mscrId + "_" + PinMode + ";";
var pinMap = mapDerivativeWithPinMap[Derivative];
for each (var item in pinMap) {
if (item.match(PinMode) == PinMode) {
// SIUL2_1_PORT114_I2C_1_I2C1_SCL_INOUT;18:1@205^4", => [SIUL2, 1, PORT114, I2C, 1, I2C1, SCL, INOUT]
var OutPinAltFunc_IP = item.split(":")[0].split(";")[1];
}
}
}
return OutPinAltFunc_IP;
}
function GetAltInputConf_IP(Derivative, PortPin) {
var MacPinMode_IP = PortPin.getChildById("PortPinMode").getValue();
var inputMuxReg_IP;
var inputMux0_IP;
if (MacPinMode_IP == "GPIO") {
inputMuxReg_IP = 0;
inputMux0_IP = "PORT_INPUT_MUX_NO_INIT";
}
else {
var MacPinMode_IP = PortPin.getChildById("PortPinSiul2Instance").getValue() + "_PORT" + PortPin.getChildById("PortPinPcr").getValue() + "_" + PortPin.getChildById("PortPinMode").getValue() + ";";
var pinMap = mapDerivativeWithPinMap[Derivative];
for each (var item in pinMap) {
if (item.match(MacPinMode_IP) == MacPinMode_IP) {
// SIUL2_1_PORT114_I2C_1_I2C1_SCL_INOUT;18:1@205^4", => [SIUL2, 1, PORT114, I2C, 1, I2C1, SCL, INOUT]
var InPinImcrSiulNumber_IP = item.split("@")[0].split(":")[1];
var InPinImcrRegNumber_IP = item.split("^")[0].split("@")[1];
var OutPinAltFunc_IP = item.split(":")[0].split(";")[1];
if (parseInt(InPinImcrSiulNumber_IP) == 65535) {
inputMuxReg_IP = 0;
inputMux0_IP = "PORT_INPUT_MUX_NO_INIT";
}
else {
var InPinAltFunc_IP = item.split("^")[1].split("~")[0];
inputMux0_IP = "PORT_INPUT_MUX_ALT" + InPinAltFunc_IP;
if (parseInt(InPinImcrSiulNumber_IP) == 3) {
inputMuxReg_IP = parseInt(InPinImcrRegNumber_IP) + 512;
}
else {
inputMuxReg_IP = parseInt(InPinImcrRegNumber_IP);
}
}
}
}
}
/* store the values into object literal */
pinconfig.inputMuxReg_IP = inputMuxReg_IP;
pinconfig.inputMux0_IP = inputMux0_IP;
}
function CalculateSSS_IO_IP(Derivative, PortPin) {
var PinAltFunc = GetAltConf_IP(Derivative, PortPin);
var muxVal = 0;
if (PinAltFunc == 16) {
muxVal = 0;
pinconfig.outputBuffer_IP = "PORT_OUTPUT_BUFFER_DISABLED";
pinconfig.inputBuffer_IP = "PORT_INPUT_BUFFER_ENABLED";
}
else {
if (PinAltFunc >= 34) {
muxVal = PinAltFunc - 33;
pinconfig.outputBuffer_IP = "PORT_OUTPUT_BUFFER_ENABLED";
pinconfig.inputBuffer_IP = "PORT_INPUT_BUFFER_ENABLED";
}
else if (PinAltFunc >= 18) {
muxVal = 0;
pinconfig.outputBuffer_IP = "PORT_OUTPUT_BUFFER_DISABLED";
pinconfig.inputBuffer_IP = "PORT_INPUT_BUFFER_ENABLED";
}
else if (PinAltFunc == 17) {
muxVal = 0;
pinconfig.outputBuffer_IP = "PORT_OUTPUT_BUFFER_ENABLED";
pinconfig.inputBuffer_IP = "PORT_INPUT_BUFFER_DISABLED";
pinconfig.saveMode_IP = "PORT_SAFE_MODE_ENABLED";
}
else if (PinAltFunc > 0) {
muxVal = PinAltFunc;
pinconfig.outputBuffer_IP = "PORT_OUTPUT_BUFFER_ENABLED";
pinconfig.inputBuffer_IP = "PORT_INPUT_BUFFER_DISABLED";
}
else {
/* The pin is configured as GPIO. Look in the PortPinDirection combo for port direction */
muxVal = 0;
var PortPinDirection = PortPin.getChildById("PortPinDirection").getValue();
switch (PortPinDirection)
{
case "PORT_PIN_INOUT":
pinconfig.outputBuffer_IP = "PORT_OUTPUT_BUFFER_ENABLED";
pinconfig.inputBuffer_IP = "PORT_INPUT_BUFFER_ENABLED";
break;
case "PORT_PIN_OUT":
pinconfig.outputBuffer_IP = "PORT_OUTPUT_BUFFER_ENABLED";
pinconfig.inputBuffer_IP = "PORT_INPUT_BUFFER_DISABLED";
break;
case "PORT_PIN_IN":
pinconfig.outputBuffer_IP = "PORT_OUTPUT_BUFFER_DISABLED";
pinconfig.inputBuffer_IP = "PORT_INPUT_BUFFER_ENABLED";
break;
default:
pinconfig.outputBuffer_IP = "PORT_OUTPUT_BUFFER_DISABLED";
pinconfig.inputBuffer_IP = "PORT_INPUT_BUFFER_DISABLED";
break;
}
}
}
/* Check if read status is enabled */
if (PortPin.getChildById("PortPinWithReadBack").getValue()) {
pinconfig.inputBuffer_IP = "PORT_INPUT_BUFFER_ENABLED";
}
var sourceSignalSelects = [
"PORT_MUX_AS_GPIO",
"PORT_MUX_ALT1",
"PORT_MUX_ALT2",
"PORT_MUX_ALT3",
"PORT_MUX_ALT4",
"PORT_MUX_ALT5",
"PORT_MUX_ALT6",
"PORT_MUX_ALT7",
"PORT_MUX_ALT8",
"PORT_MUX_ALT9",
"PORT_MUX_ALT10",
"PORT_MUX_ALT11",
"PORT_MUX_ALT12",
"PORT_MUX_ALT13",
"PORT_MUX_ALT14",
"PORT_MUX_ALT15"
];
pinconfig.mux_IP = sourceSignalSelects[parseInt(muxVal)];
}
function GetPDO_IP(PortPin) {
var PinMode = PortPin.getChildById("PortPinMode").getValue();
if (PinMode.match("ADC") == null) {
var PortPinLevelValue = PortPin.getChildById("PortPinLevelValue").getValue();
switch (PortPinLevelValue) {
case "PORT_PIN_LEVEL_LOW":
pinconfig.initValue_IP = 0;
break;
case "PORT_PIN_LEVEL_HIGH":
pinconfig.initValue_IP = 1;
break;
case "PORT_PIN_LEVEL_NOTCHANGED":
pinconfig.initValue_IP = 2;
break;
default:
break;
}
}
else {
pinconfig.initValue_IP = 2;
}
}
function GetSafeMode(PortPin) {
if (PortPin.getChildById("PortPinSafeMode").getValue()) {
pinconfig.safeMode_IP = "PORT_SAFE_MODE_ENABLED";
}
else {
pinconfig.safeMode_IP = "PORT_SAFE_MODE_DISABLED";
}
}
function GetAdcInterleaves(Derivative, PortPin) {
var PinMode = PortPin.getChildById("PortPinMode").getValue();
var mscrId = PortPin.getChildById("PortPinPcr").getValue();
var adcInterleave = "MUX_MODE_NOT_AVAILABLE";
if (PinMode.match("ADC") == "ADC") {
var _PinMode = "PORT" + mscrId + "_" + PinMode + ";";
var pinMapInterleave = mapDerivativeWithPinMap[Derivative];
for each (var item in pinMapInterleave) {
if ((item.match(_PinMode) == _PinMode) && (item.split("*")[1] != 65535)) {
// SIUL2_1_PORT114_I2C_1_I2C1_SCL_INOUT;18:1@205^4", => [SIUL2, 1, PORT114, I2C, 1, I2C1, SCL, INOUT]
var interleaveArr = PinMode.split("_");
interleaveArr.pop();
interleaveArr = interleaveArr.slice(1); /* remove first arr element */
var interleaveChannel = interleaveArr.join("_");
var adcInterleave = "MUX_MODE_EN_" + interleaveChannel + "_" + item.split("*")[1];
}
}
}
return adcInterleave;
}
function GetMscrPDACSlot(PortPin) {
var mscrPdacSlot = 0;
if(getChildrenByASPath(configSet, "/AUTOSAR/EcucDefs/Rm").length != 0)
{
var mscrPad = PortPin.getChildById("PortPinPcr").getValue();
var virtualWrapperConfigItem = getChildrenByASPath(configSet, "/AUTOSAR/EcucDefs/Rm/RmGeneral/RmVirtWrapperConfigurable")[0];
if(virtualWrapperConfigItem.getValue() == true)
{
var mscrConfigList = getChildrenByASPath(configSet, "/AUTOSAR/EcucDefs/Rm/RmConfigSet/Virt_Wrapper_Configuration/Mscr_Config_List");
for each (var mscrConfig in mscrConfigList)
{
if(mscrConfig.getChildById("MscrNumber").getValue() == mscrPad)
{
var mscrPdacEnum = mscrConfig.getChildById("MscrMirror").getValue();
if((-1) != mscrPdacEnum.indexOf("PDAC0"))
{
mscrPdacSlot = 0;
}
else if((-1) != mscrPdacEnum.indexOf("PDAC1"))
{
mscrPdacSlot = 1;
}
else if((-1) != mscrPdacEnum.indexOf("PDAC2"))
{
mscrPdacSlot = 2;
}
else if((-1) != mscrPdacEnum.indexOf("PDAC3"))
{
mscrPdacSlot = 3;
}
else if((-1) != mscrPdacEnum.indexOf("PDAC4"))
{
mscrPdacSlot = 4;
}
else if((-1) != mscrPdacEnum.indexOf("PDAC5"))
{
mscrPdacSlot = 5;
}
else
{
/* Not do anything */
}
}
}
}
}
else
{
mscrPdacSlot = PortPin.getChildById("MscrPdacSlot").getValue();
mscrPdacSlot = mscrPdacSlot.split("PDAC")[1];
}
return mscrPdacSlot;
}
function GetImcrPDACSlot(PortPin) {
var imcrPdacSlot = 0;
if(getChildrenByASPath(configSet, "/AUTOSAR/EcucDefs/Rm").length != 0)
{
var virtualWrapperConfigItem = getChildrenByASPath(configSet, "/AUTOSAR/EcucDefs/Rm/RmGeneral/RmVirtWrapperConfigurable")[0];
if(virtualWrapperConfigItem.getValue() == true)
{
var imcrConfigList = getChildrenByASPath(configSet, "/AUTOSAR/EcucDefs/Rm/RmConfigSet/Virt_Wrapper_Configuration/Imcr_Config_List");
for each (var imcrConfig in imcrConfigList)
{
if(imcrConfig.getChildById("ImcrNumber").getValue() == pinconfig.inputMuxReg_IP)
{
var imcrPdacEnum = imcrConfig.getChildById("ImcrMirror").getValue();
if((-1) != imcrPdacEnum.indexOf("PDAC0"))
{
imcrPdacSlot = 0;
}
else if((-1) != imcrPdacEnum.indexOf("PDAC1"))
{
imcrPdacSlot = 1;
}
else if((-1) != imcrPdacEnum.indexOf("PDAC2"))
{
imcrPdacSlot = 2;
}
else if((-1) != imcrPdacEnum.indexOf("PDAC3"))
{
imcrPdacSlot = 3;
}
else if((-1) != imcrPdacEnum.indexOf("PDAC4"))
{
imcrPdacSlot = 4;
}
else if((-1) != imcrPdacEnum.indexOf("PDAC5"))
{
imcrPdacSlot = 5;
}
else
{
/* Not do anything */
}
}
}
}
}
else
{
imcrPdacSlot = PortPin.getChildById("ImcrPdacSlot").getValue();
imcrPdacSlot = imcrPdacSlot.split("PDAC")[1];
}
return imcrPdacSlot;
}
!]
[!
var functionalVariantName = useFgInfix() ? "_" + functionalGroupName : "";
const Siul2_Port_Ip_PinSettingsConfig g_pin_mux_InitConfigArr$functionalVariantName$[NUM_OF_CONFIGURED_PINS] = \n{\n
var PortContainerList = PortContainer.getChildren();
for each (var PortContainer in PortContainerList)
{
var PortPinList = PortContainer.getChildById("PortPin").getChildren();
for each (var PortPin in PortPinList)
{
configuredPinsArr.push(PortPin.getChildById("PortPinPcr").getValue());
}
}
var i = 0;
for each (var PortContainer in PortContainerList)
{
var PortPinList = PortContainer.getChildById("PortPin").getChildren();
for each (var PortPin in PortPinList)
{
var END_CODE = (i++ < configuredPinsArr.length - 1)?",\n":"\n";
var pinconfig = {
base_IP: 0,
pinPortIdx_IP: 0,
mux_value_IP: 0,
mux_IP: "PORT_MUX_AS_GPIO",
safeMode_IP: "PORT_SAFE_MODE_DISABLED",
pullConfig_IP: "PORT_INTERNAL_PULL_NOT_ENABLED",
driveStrength_IP: "PORT_DRIVE_STRENTGTH_DISABLED",
inputFilter_IP: "PORT_INPUT_FILTER_DISABLED",
pullKeep_IP: "PORT_PULL_KEEP_DISABLED",
invert_IP: "PORT_INVERT_DISABLED",
slewRateCtrlSel_IP: "PORT_SLEW_RATE_FASTEST",
inputBuffer_IP: "PORT_INPUT_BUFFER_DISABLED",
outputBuffer_IP: "PORT_OUTPUT_BUFFER_DISABLED",
adcInterleave0_IP: "MUX_MODE_NOT_AVAILABLE",
adcInterleave1_IP: "MUX_MODE_NOT_AVAILABLE",
initValue_IP: "0",
inputMuxReg_IP: "0",
inputMux0_IP: "PORT_INPUT_MUX_NO_INIT",
inputMux1_IP: "PORT_INPUT_MUX_NO_INIT",
inputMux2_IP: "PORT_INPUT_MUX_NO_INIT",
inputMux3_IP: "PORT_INPUT_MUX_NO_INIT",
inputMux4_IP: "PORT_INPUT_MUX_NO_INIT",
inputMux5_IP: "PORT_INPUT_MUX_NO_INIT",
inputMux6_IP: "PORT_INPUT_MUX_NO_INIT",
inputMux7_IP: "PORT_INPUT_MUX_NO_INIT"
};
if (PortGeneral.getChildById("VirtWrapperSupport").getValue())
{
pinconfig["mscrPdacSlot_IP"] = "0";
pinconfig["imcrPdacSlot_IP"] = "0";
}
/* Calculate SSS */
CalculateSSS_IO_IP(PortDerivative, PortPin);
/*Get Alt INput*/
GetAltInputConf_IP(PortDerivative, PortPin);
/* Get SafeMode */
GetSafeMode(PortPin);
/* Get port data out value*/
GetPDO_IP(PortPin);
/* Get adc interleave mux mode */
pinconfig.adcInterleave0_IP = GetAdcInterleaves(PortDerivative, PortPin);
/* Get base configured */
pinconfig.baseIP = PortPin.getChildById("PortPinSiul2Instance").getValue();
/* Get pinPortIdx configured */
pinconfig.pinPortIdx_IP = PortPin.getChildById("PortPinPcr").getValue();
/* get pull configured */
if (PortPin.getChildById("PortPinPue").getValue()) {
if (PortPin.getChildById("PortPinPus").getValue()) {
pinconfig.pullConfig_IP = "PORT_INTERNAL_PULL_UP_ENABLED";
}
else {
pinconfig.pullConfig_IP = "PORT_INTERNAL_PULL_DOWN_ENABLED";
}
}
else {
pinconfig.pullConfig_IP = "PORT_INTERNAL_PULL_NOT_ENABLED";
}
/* DriveStrength */
pinconfig.driveStrength_IP = (PortPin.getChildById("PortPinDse").getValue() == true)? "PORT_DRIVE_STRENTGTH_ENABLED":"PORT_DRIVE_STRENTGTH_DISABLED";
/* InputFilter */
pinconfig.inputFilter_IP = (PortPin.getChildById("PortPinIfe").getValue() == true)? "PORT_INPUT_FILTER_ENABLED":"PORT_INPUT_FILTER_DISABLED";
/* Pullkeep */
pinconfig.pullKeep_IP = (PortPin.getChildById("PortPinPke").getValue() == true)? "PORT_PULL_KEEP_ENABLED":"PORT_PULL_KEEP_DISABLED";
/* invert */
pinconfig.invert_IP = (PortPin.getChildById("PortPinInvertControl").getValue() == true)? "PORT_INVERT_ENABLED":"PORT_INVERT_DISABLED";
/* Slewrate */
var mapSlewRate = {
"FASTEST_SETTING": "PORT_SLEW_RATE_FASTEST",
"SLOWEST_SETTING": "PORT_SLEW_RATE_SLOWEST",
"SLEW_RATE_NOT_AVAILABLE": "PORT_SLEW_RATE_NOT_AVAILABLE"
}
pinconfig.slewRateCtrlSel_IP = mapSlewRate[PortPin.getChildById("PortPinSlewRate").getValue()];
if (PortGeneral.getChildById("VirtWrapperSupport").getValue()) {
var imcrPdacSlot = GetImcrPDACSlot(PortPin);
var mscrPdacSlot = GetMscrPDACSlot(PortPin);
pinconfig["imcrPdacSlot_IP"] = imcrPdacSlot;
pinconfig["mscrPdacSlot_IP"] = mscrPdacSlot;
pinconfig.base_IP = "SIUL2_PDAC" + mscrPdacSlot;
}
else {
pinconfig.base_IP = "IP_SIUL2";
}
{\n
.base = $pinconfig.base_IP$,\n
.pinPortIdx = $pinconfig.pinPortIdx_IP$,\n
.mux = $pinconfig.mux_IP$,\n
.safeMode = $pinconfig.safeMode_IP$,\n
.pullConfig = $pinconfig.pullConfig_IP$,\n
.driveStrength = $pinconfig.driveStrength_IP$,\n
.inputFilter = $pinconfig.inputFilter_IP$,\n
.pullKeep = $pinconfig.pullKeep_IP$,\n
.invert = $pinconfig.invert_IP$,\n
.slewRateCtrlSel = $pinconfig.slewRateCtrlSel_IP$,\n
.inputBuffer = $pinconfig.inputBuffer_IP$,\n
.outputBuffer = $pinconfig.outputBuffer_IP$,\n
.adcInterleaves = {\n
$pinconfig.adcInterleave0_IP$,\n
$pinconfig.adcInterleave1_IP$,\n
},\n
.initValue = $pinconfig.initValue_IP$,\n
.inputMuxReg = {\n
$pinconfig.inputMuxReg_IP$\n
},\n
.inputMux = {\n
$pinconfig.inputMux0_IP$,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
PORT_INPUT_MUX_NO_INIT,\n
if (PortGeneral.getChildById("VirtWrapperSupport").getValue()) {
PORT_INPUT_MUX_NO_INIT\n
},\n
.mscrPdacSlot = $pinconfig.mscrPdacSlot_IP$,\n
.imcrPdacSlot = $pinconfig.imcrPdacSlot_IP$\n
}
else {
PORT_INPUT_MUX_NO_INIT\n
}\n
}
}$END_CODE$
}
}
};
!]
#define PORT_STOP_SEC_CONFIG_DATA_UNSPECIFIED
#include "Port_MemMap.h"
/*==================================================================================================
* LOCAL FUNCTION PROTOTYPES
==================================================================================================*/
/*==================================================================================================
* LOCAL FUNCTIONS
==================================================================================================*/
/*==================================================================================================
* GLOBAL FUNCTIONS
==================================================================================================*/
#ifdef __cplusplus
}
#endif
/** @} */