<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<IP xmlns="http://mcd.rou.st.com/modules.php?name=mcu" xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance" DBVersion="V4.0" IncludeFile="stm32l5xx_hal.h" Name="GPIO" Version="STM32Cube_FW_L5_V1.0.0RC1" ns0:schemaLocation="http://mcd.rou.st.com/modules.php?name=mcu ../../../../../../../doc/V4/Development/Specifications/db/IP_Configs.xsd">
    <RefConfig Name="GPIO">
        <IFCondition Expression="GENERATE_GPIO_CONFIG">
        <CallLibMethod Name="HAL_GPIO_Init" ReturnHAL="false">
            <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
            <MethodArg Name="Mode" ParameterName="GPIO_Mode"/>
            <MethodArg Name="Pull" ParameterName="GPIO_PuPd"/>
            <MethodArg Name="Alternate" ParameterName="GPIO_AF"/>
            <MethodArg Name="Speed" ParameterName="GPIO_Speed"/>
        </CallLibMethod>
        </IFCondition>
         <IFCondition Expression="NS_PIN">
            <CallLibMethod Name="HAL_GPIO_ConfigPinAttributes" ReturnHAL="false">
                <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
                <MethodArg Name="PinAttributes" FValue="GPIO_PIN_NSEC"/>
            </CallLibMethod>
        </IFCondition>
    </RefConfig>
    <RefConfig Name="GPIODefaultOutputPP">
         <IFCondition Expression="NS_PIN">
            <CallLibMethod Name="HAL_GPIO_ConfigPinAttributes" ReturnHAL="false">
                <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
                <MethodArg Name="PinAttributes" FValue="GPIO_PIN_NSEC"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression="GENERATE_GPIO_CONFIG">
        <CallLibMethod Name="HAL_GPIO_WritePin" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="PinState"/>
        </CallLibMethod>
        <CallLibMethod Name="HAL_GPIO_Init" ReturnHAL="false">
            <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
            <MethodArg Name="Mode" ParameterName="GPIO_ModeDefaultOutputPP"/>
            <MethodArg Name="Pull" ParameterName="GPIO_PuPd"/>
            <MethodArg Name="Alternate" ParameterName="GPIO_AF"/>
            <MethodArg Name="Speed" ParameterName="GPIO_Speed"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM9"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM8"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM7"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM6"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FMA9"/>
        </CallLibMethod>
        </IFCondition>
    </RefConfig>
    <RefConfig Name="AlternateFunction">
        <IFCondition Expression="NS_PIN">
            <CallLibMethod Name="HAL_GPIO_ConfigPinAttributes" ReturnHAL="false">
                <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
                <MethodArg Name="PinAttributes" FValue="GPIO_PIN_NSEC"/>
            </CallLibMethod>
        </IFCondition>        
        <IFCondition Expression="GENERATE_GPIO_CONFIG">
        <CallLibMethod Name="HAL_GPIO_Init" ReturnHAL="false">
            <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
            <MethodArg Name="Mode" ParameterName="GPIO_Mode"/>
            <MethodArg Name="Pull" ParameterName="GPIO_PuPd"/>
            <MethodArg Name="Alternate" ParameterName="GPIO_AF"/>
            <MethodArg Name="Speed" ParameterName="GPIO_Speed"/>
        </CallLibMethod>        
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM9"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM8"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM7"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM6"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FMA9"/>
        </CallLibMethod>
        </IFCondition>
    </RefConfig>
    <RefConfig Name="AlternateFunctionHighSpeedDefault">
         <IFCondition Expression="NS_PIN">
            <CallLibMethod Name="HAL_GPIO_ConfigPinAttributes" ReturnHAL="false">
                <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
                <MethodArg Name="PinAttributes" FValue="GPIO_PIN_NSEC"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression="GENERATE_GPIO_CONFIG">
        <CallLibMethod Name="HAL_GPIO_Init" ReturnHAL="false">
            <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
            <MethodArg Name="Mode" ParameterName="GPIO_Mode"/>
            <MethodArg Name="Pull" ParameterName="GPIO_PuPd"/>
            <MethodArg Name="Alternate" ParameterName="GPIO_AF"/>
            <MethodArg Name="Speed" ParameterName="GPIO_Speed_High_Default"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM9"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM8"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM7"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM6"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FMA9"/>
        </CallLibMethod>
        </IFCondition>
    </RefConfig>
    <RefConfig Name="AlternateFunctionDefaultPP">
         <IFCondition Expression="NS_PIN">
            <CallLibMethod Name="HAL_GPIO_ConfigPinAttributes" ReturnHAL="false">
                <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
                <MethodArg Name="PinAttributes" FValue="GPIO_PIN_NSEC"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression="GENERATE_GPIO_CONFIG">
        <CallLibMethod Name="HAL_GPIO_Init" ReturnHAL="false">
            <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
            <MethodArg Name="Mode" ParameterName="GPIO_ModeDefaultPP"/>
            <MethodArg Name="Pull" ParameterName="GPIO_PuPd"/>
            <MethodArg Name="Alternate" ParameterName="GPIO_AF"/>
            <MethodArg Name="Speed" ParameterName="GPIO_Speed"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM9"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM8"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM7"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM6"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FMA9"/>
        </CallLibMethod>
        </IFCondition>
    </RefConfig>
    <RefConfig Name="AlternateFunctionDefaultOD">
         <IFCondition Expression="NS_PIN">
            <CallLibMethod Name="HAL_GPIO_ConfigPinAttributes" ReturnHAL="false">
                <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
                <MethodArg Name="PinAttributes" FValue="GPIO_PIN_NSEC"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression="GENERATE_GPIO_CONFIG">
        <CallLibMethod Name="HAL_GPIO_Init" ReturnHAL="false">
            <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
            <MethodArg Name="Mode" ParameterName="GPIO_ModeDefaultOD"/>
            <MethodArg Name="Pull" ParameterName="GPIO_PuPd"/>
            <MethodArg Name="Alternate" ParameterName="GPIO_AF"/>
            <MethodArg Name="Speed" ParameterName="GPIO_Speed"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM9"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM8"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM7"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FM6"/>
        </CallLibMethod>
        <CallLibMethod Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE" ReturnHAL="false">
            <MethodArg Name="Parametre" ParameterName="GPIO_FMA9"/>
        </CallLibMethod>    	
        </IFCondition>
    </RefConfig>
    <RefConfig Name="System">
        <IFCondition Expression="NS_PIN">
            <CallLibMethod Name="HAL_GPIO_ConfigPinAttributes" ReturnHAL="false">
                <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
                <MethodArg Name="PinAttributes" FValue="GPIO_PIN_NSEC"/>
            </CallLibMethod> 
        </IFCondition>
    </RefConfig>
    <RefConfig Name="EXTI">
        <IFCondition Expression="NS_PIN">
            <CallLibMethod Name="HAL_GPIO_ConfigPinAttributes" ReturnHAL="false">
                <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
                <MethodArg Name="PinAttributes" FValue="GPIO_PIN_NSEC"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression="GENERATE_GPIO_CONFIG">
            <IFCondition Expression="S_SECURE">
            <IFCondition Expression="PinAttribute=CortexM33S &amp; Privilege=EXTI_LINE_NPRIV">
                <CallLibMethod Name="HAL_EXTI_ConfigLineAttributes" ReturnHAL="false">
                    <MethodArg Name="ExtiLine" ParameterName="EXTI_Line"/>
                    <MethodArg Name="LineAttributes" FValue="EXTI_LINE_SEC"/>
                </CallLibMethod>                
            </IFCondition>
            <IFCondition Expression="PinAttribute=CortexM33S &amp; Privilege=EXTI_LINE_PRIV">
                <CallLibMethod Name="HAL_EXTI_ConfigLineAttributes" ReturnHAL="false">
                    <MethodArg Name="ExtiLine" ParameterName="EXTI_Line"/>
                    <MethodArg Name="LineAttributes" FValue="EXTI_LINE_SEC|EXTI_LINE_PRIV"/>
                </CallLibMethod>                
            </IFCondition>
            <IFCondition Expression="PinAttribute=CortexM33NS &amp; Privilege=EXTI_LINE_PRIV">
                <CallLibMethod Name="HAL_EXTI_ConfigLineAttributes" ReturnHAL="false">
                    <MethodArg Name="ExtiLine" ParameterName="EXTI_Line"/>
                    <MethodArg Name="LineAttributes" FValue="EXTI_LINE_PRIV"/>
                </CallLibMethod>
            </IFCondition>
            <Else>
                <IFCondition Expression="Privilege=EXTI_LINE_PRIV">
                <CallLibMethod Name="HAL_EXTI_ConfigLineAttributes" ReturnHAL="false">
                    <MethodArg Name="ExtiLine" ParameterName="EXTI_Line"/>
                    <MethodArg Name="LineAttributes" FValue="EXTI_LINE_PRIV"/>
                </CallLibMethod>
            </IFCondition>
            </Else>
        </IFCondition>
        </IFCondition>
        <IFCondition Expression="GENERATE_GPIO_CONFIG">
        <CallLibMethod Name="HAL_GPIO_Init" ReturnHAL="false">
            <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
            <MethodArg Name="Mode" ParameterName="GPIO_ModeDefaultEXTI"/>
            <MethodArg Name="Pull" ParameterName="GPIO_PuPd"/>
            <MethodArg Name="Alternate" ParameterName="GPIO_AF"/>
            <MethodArg Name="Speed" ParameterName="GPIO_Speed"/>
        </CallLibMethod>
        </IFCondition>  
    </RefConfig>
    <RefConfig Name="EXTIRisingFalling">
         <IFCondition Expression="NS_PIN">
            <CallLibMethod Name="HAL_GPIO_ConfigPinAttributes" ReturnHAL="false">
                <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
                <MethodArg Name="PinAttributes" FValue="GPIO_PIN_NSEC"/>
            </CallLibMethod>
        </IFCondition>
        <IFCondition Expression="GENERATE_GPIO_CONFIG">
            <IFCondition Expression="S_SECURE">
            <IFCondition Expression="PinAttribute=CortexM33S &amp; Privilege=EXTI_LINE_NPRIV">
                <CallLibMethod Name="HAL_EXTI_ConfigLineAttributes" ReturnHAL="false">
                    <MethodArg Name="ExtiLine" ParameterName="EXTI_Line"/>
                    <MethodArg Name="LineAttributes" FValue="EXTI_LINE_SEC"/>
                </CallLibMethod>                
            </IFCondition>
            <IFCondition Expression="PinAttribute=CortexM33S &amp; Privilege=EXTI_LINE_PRIV">
                <CallLibMethod Name="HAL_EXTI_ConfigLineAttributes" ReturnHAL="false">
                    <MethodArg Name="ExtiLine" ParameterName="EXTI_Line"/>
                    <MethodArg Name="LineAttributes" FValue="EXTI_LINE_SEC|EXTI_LINE_PRIV"/>
                </CallLibMethod>                
            </IFCondition>
            <IFCondition Expression="PinAttribute=CortexM33NS &amp; Privilege=EXTI_LINE_PRIV">
                <CallLibMethod Name="HAL_EXTI_ConfigLineAttributes" ReturnHAL="false">
                    <MethodArg Name="ExtiLine" ParameterName="EXTI_Line"/>
                    <MethodArg Name="LineAttributes" FValue="EXTI_LINE_PRIV"/>
                </CallLibMethod>
            </IFCondition>
            <Else>
                <IFCondition Expression="Privilege=EXTI_LINE_PRIV">
                <CallLibMethod Name="HAL_EXTI_ConfigLineAttributes" ReturnHAL="false">
                    <MethodArg Name="ExtiLine" ParameterName="EXTI_Line"/>
                    <MethodArg Name="LineAttributes" FValue="EXTI_LINE_PRIV"/>
                </CallLibMethod>
            </IFCondition>
            </Else>
            </IFCondition>
        </IFCondition>
        <IFCondition Expression="GENERATE_GPIO_CONFIG">
        <CallLibMethod Name="HAL_GPIO_Init" ReturnHAL="false">
            <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
            <MethodArg Name="Mode" ParameterName="GPIO_ModeDefaultEXTI_IT_RF"/>
            <MethodArg Name="Pull" ParameterName="GPIO_PuPd"/>
            <MethodArg Name="Alternate" ParameterName="GPIO_AF"/>
            <MethodArg Name="Speed" ParameterName="GPIO_Speed"/>
        </CallLibMethod>
        </IFCondition>
    </RefConfig>
    <RefConfig Name="GPIO_ConfigPinAttributes">
        <IFCondition Expression="NS_PIN">
            <CallLibMethod Name="HAL_GPIO_ConfigPinAttributes" ReturnHAL="false">
                <MethodArg Name="Pin" ParameterName="GPIO_Pin"/>
                <MethodArg Name="PinAttributes" FValue="GPIO_PIN_NSEC"/>
            </CallLibMethod>
            <Else>
            <IFCondition Expression="S_SECURE">
                <CallLibMethod Name="HAL_EXTI_ConfigLineAttributes" ReturnHAL="false">
                    <MethodArg Name="ExtiLine" ParameterName="EXTI_Line"/>
                    <MethodArg Name="LineAttributes" FValue="EXTI_LINE_SEC"/>
                </CallLibMethod>                
            </IFCondition>
            </Else>
        </IFCondition>
     </RefConfig>
    <RefConfig Name="DeInit">
        <CallLibMethod Name="HAL_GPIO_DeInit" ReturnHAL="false"/>
    </RefConfig>
    <LibMethod Comment="" Name="__HAL_SYSCFG_FASTMODEPLUS_ENABLE">
        <Argument Comment="Enbvkh" GenericType="simple" Name="Parametre" OptimizationCondition="equal"/>
    </LibMethod>
    <LibMethod Comment="Configure GPIO pin" Name="HAL_GPIO_Init" Optimizable="true">
        <Argument Comment="Port address" GenericType="simple" Name="GPIOx" OptimizationCondition="Equal"/>
        <Argument AddressOf="true" Comment="Configuration parameters" GenericType="struct" Name="GPIO_InitStruct" TypeName="GPIO_InitTypeDef">
            <Argument Comment="Pin mask" GenericType="simple" Name="Pin" OptimizationCondition="BitwiseOr"/>
            <Argument Comment="IO mode" GenericType="simple" Name="Mode" OptimizationCondition="Equal"/>
            <Argument Comment="Pull up/Pull down selection" GenericType="simple" Name="Pull" OptimizationCondition="Equal"/>
            <Argument Comment="Output speed" GenericType="simple" Name="Speed" OptimizationCondition="Equal"/>
            <Argument Comment="Alternate" GenericType="simple" Name="Alternate" OptimizationCondition="Equal"/>
        </Argument>
    </LibMethod>
    <LibMethod Comment="De-initializes the GPIOx peripheral registers to their default reset values." Name="HAL_GPIO_DeInit" Optimizable="true">
        <Argument AddressOf="false" GenericType="simple" Name="GPIOx" OptimizationCondition="Equal" TypeName="GPIO_TypeDef"/>
        <Argument AddressOf="false" GenericType="simple" Name="GPIO_Pin" OptimizationCondition="BitwiseOr"/>
    </LibMethod>
    <LibMethod Comment="IO attributes management functions" Name="HAL_GPIO_ConfigPinAttributes" Optimizable="true">
        <Argument AddressOf="false" GenericType="simple" Name="GPIOx" OptimizationCondition="Equal" TypeName="GPIO_TypeDef"/>
        <Argument AddressOf="false" GenericType="simple" Name="GPIO_Pin" OptimizationCondition="BitwiseOr"/>
        <Argument AddressOf="false" GenericType="simple" Name="PinAttributes" OptimizationCondition="BitwiseOr"/>
    </LibMethod>
    <LibMethod Comment="Configure the EXTI line attribute" Name="HAL_EXTI_ConfigLineAttributes" Optimizable="true">
        <Argument AddressOf="false" GenericType="simple" Name="ExtiLine" OptimizationCondition="Equal"/>
        <Argument AddressOf="false" GenericType="simple" Name="LineAttributes" OptimizationCondition="Equal"/>
    </LibMethod>
    <!--test-->
    
   <LibMethod Comment="Configure GPIO pin Output Level" Name="HAL_GPIO_WritePin" Optimizable="true">
        <Argument AddressOf="false" GenericType="baseaddress" Name="GPIOx" OptimizationCondition="equal" TypeName="GPIO_TypeDef"/>
        <Argument AddressOf="false" GenericType="simple" Name="GPIO_Pin" OptimizationCondition="BitwiseOr"/>
        <Argument AddressOf="false" GenericType="simple" Name="PinState" OptimizationCondition="equal"/>
    </LibMethod>    
</IP>
