STM32F103xB HAL User Manual
Functions
Port Configuration
GPIO Exported Functions

Functions

__STATIC_INLINE void LL_GPIO_SetPinMode (GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Mode)
 Configure gpio mode for a dedicated pin on dedicated port.
__STATIC_INLINE uint32_t LL_GPIO_GetPinMode (GPIO_TypeDef *GPIOx, uint32_t Pin)
 Return gpio mode for a dedicated pin on dedicated port.
__STATIC_INLINE void LL_GPIO_SetPinSpeed (GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Speed)
 Configure gpio speed for a dedicated pin on dedicated port.
__STATIC_INLINE uint32_t LL_GPIO_GetPinSpeed (GPIO_TypeDef *GPIOx, uint32_t Pin)
 Return gpio speed for a dedicated pin on dedicated port.
__STATIC_INLINE void LL_GPIO_SetPinOutputType (GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t OutputType)
 Configure gpio output type for several pins on dedicated port.
__STATIC_INLINE uint32_t LL_GPIO_GetPinOutputType (GPIO_TypeDef *GPIOx, uint32_t Pin)
 Return gpio output type for several pins on dedicated port.
__STATIC_INLINE void LL_GPIO_SetPinPull (GPIO_TypeDef *GPIOx, uint32_t Pin, uint32_t Pull)
 Configure gpio pull-up or pull-down for a dedicated pin on a dedicated port.
__STATIC_INLINE uint32_t LL_GPIO_GetPinPull (GPIO_TypeDef *GPIOx, uint32_t Pin)
 Return gpio pull-up or pull-down for a dedicated pin on a dedicated port.
__STATIC_INLINE void LL_GPIO_LockPin (GPIO_TypeDef *GPIOx, uint32_t PinMask)
 Lock configuration of several pins for a dedicated port.
__STATIC_INLINE uint32_t LL_GPIO_IsPinLocked (GPIO_TypeDef *GPIOx, uint32_t PinMask)
 Return 1 if all pins passed as parameter, of a dedicated port, are locked.
__STATIC_INLINE uint32_t LL_GPIO_IsAnyPinLocked (GPIO_TypeDef *GPIOx)
 Return 1 if one of the pin of a dedicated port is locked.

Function Documentation

__STATIC_INLINE uint32_t LL_GPIO_GetPinMode ( GPIO_TypeDef *  GPIOx,
uint32_t  Pin 
)

Return gpio mode for a dedicated pin on dedicated port.

Note:
I/O mode can be Analog, Floating input, Input with pull-up/pull-down, General purpose Output, Alternate function Output.
Warning: only one pin can be passed as parameter.
Reference Manual to LL API cross reference:
CRL CNFy LL_GPIO_GetPinMode
Reference Manual to LL API cross reference:
CRL MODEy LL_GPIO_GetPinMode
Reference Manual to LL API cross reference:
CRH CNFy LL_GPIO_GetPinMode
Reference Manual to LL API cross reference:
CRH MODEy LL_GPIO_GetPinMode
Parameters:
GPIOxGPIO Port
PinThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 382 of file stm32f1xx_ll_gpio.h.

__STATIC_INLINE uint32_t LL_GPIO_GetPinOutputType ( GPIO_TypeDef *  GPIOx,
uint32_t  Pin 
)

Return gpio output type for several pins on dedicated port.

Note:
Output type as to be set when gpio pin is in output or alternate modes. Possible type are Push-pull or Open-drain.
Warning: only one pin can be passed as parameter.
Reference Manual to LL API cross reference:
CRL MODEy LL_GPIO_GetPinOutputType
Reference Manual to LL API cross reference:
CRH MODEy LL_GPIO_GetPinOutputType
Parameters:
GPIOxGPIO Port
PinThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 531 of file stm32f1xx_ll_gpio.h.

__STATIC_INLINE uint32_t LL_GPIO_GetPinPull ( GPIO_TypeDef *  GPIOx,
uint32_t  Pin 
)

Return gpio pull-up or pull-down for a dedicated pin on a dedicated port.

Note:
Warning: only one pin can be passed as parameter.
Reference Manual to LL API cross reference:
ODR ODR LL_GPIO_GetPinPull
Parameters:
GPIOxGPIO Port
PinThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 596 of file stm32f1xx_ll_gpio.h.

References GPIO_PIN_MASK_POS.

__STATIC_INLINE uint32_t LL_GPIO_GetPinSpeed ( GPIO_TypeDef *  GPIOx,
uint32_t  Pin 
)

Return gpio speed for a dedicated pin on dedicated port.

Note:
I/O speed can be Low, Medium, Fast or High speed.
Warning: only one pin can be passed as parameter.
Refer to datasheet for frequency specifications and the power supply and load conditions for each speed.
Reference Manual to LL API cross reference:
CRL MODEy LL_GPIO_GetPinSpeed
Reference Manual to LL API cross reference:
CRH MODEy LL_GPIO_GetPinSpeed
Parameters:
GPIOxGPIO Port
PinThis parameter can be one of the following values:
Return values:
Returnedvalue can be one of the following values:

Definition at line 458 of file stm32f1xx_ll_gpio.h.

__STATIC_INLINE uint32_t LL_GPIO_IsAnyPinLocked ( GPIO_TypeDef *  GPIOx)

Return 1 if one of the pin of a dedicated port is locked.

else return 0.

Reference Manual to LL API cross reference:
LCKR LCKK LL_GPIO_IsAnyPinLocked
Parameters:
GPIOxGPIO Port
Return values:
Stateof bit (1 or 0).

Definition at line 675 of file stm32f1xx_ll_gpio.h.

__STATIC_INLINE uint32_t LL_GPIO_IsPinLocked ( GPIO_TypeDef *  GPIOx,
uint32_t  PinMask 
)

Return 1 if all pins passed as parameter, of a dedicated port, are locked.

else Return 0.

Reference Manual to LL API cross reference:
LCKR LCKy LL_GPIO_IsPinLocked
Parameters:
GPIOxGPIO Port
PinMaskThis parameter can be a combination of the following values:
Return values:
Stateof bit (1 or 0).

Definition at line 664 of file stm32f1xx_ll_gpio.h.

References GPIO_PIN_MASK_POS.

__STATIC_INLINE void LL_GPIO_LockPin ( GPIO_TypeDef *  GPIOx,
uint32_t  PinMask 
)

Lock configuration of several pins for a dedicated port.

Note:
When the lock sequence has been applied on a port bit, the value of this port bit can no longer be modified until the next reset.
Each lock bit freezes a specific configuration register (control and alternate function registers).
Reference Manual to LL API cross reference:
LCKR LCKK LL_GPIO_LockPin
Parameters:
GPIOxGPIO Port
PinMaskThis parameter can be a combination of the following values:
Return values:
None

Definition at line 630 of file stm32f1xx_ll_gpio.h.

References GPIO_PIN_MASK_POS.

__STATIC_INLINE void LL_GPIO_SetPinMode ( GPIO_TypeDef *  GPIOx,
uint32_t  Pin,
uint32_t  Mode 
)

Configure gpio mode for a dedicated pin on dedicated port.

Note:
I/O mode can be Analog, Floating input, Input with pull-up/pull-down, General purpose Output, Alternate function Output.
Warning: only one pin can be passed as parameter.
Reference Manual to LL API cross reference:
CRL CNFy LL_GPIO_SetPinMode
Reference Manual to LL API cross reference:
CRL MODEy LL_GPIO_SetPinMode
Reference Manual to LL API cross reference:
CRH CNFy LL_GPIO_SetPinMode
Reference Manual to LL API cross reference:
CRH MODEy LL_GPIO_SetPinMode
Parameters:
GPIOxGPIO Port
PinThis parameter can be one of the following values:
ModeThis parameter can be one of the following values:
Return values:
None

Definition at line 342 of file stm32f1xx_ll_gpio.h.

Referenced by LL_GPIO_Init().

__STATIC_INLINE void LL_GPIO_SetPinOutputType ( GPIO_TypeDef *  GPIOx,
uint32_t  Pin,
uint32_t  OutputType 
)

Configure gpio output type for several pins on dedicated port.

Note:
Output type as to be set when gpio pin is in output or alternate modes. Possible type are Push-pull or Open-drain.
Reference Manual to LL API cross reference:
CRL MODEy LL_GPIO_SetPinOutputType
Reference Manual to LL API cross reference:
CRH MODEy LL_GPIO_SetPinOutputType
Parameters:
GPIOxGPIO Port
PinThis parameter can be a combination of the following values:
OutputTypeThis parameter can be one of the following values:
Return values:
None

Definition at line 494 of file stm32f1xx_ll_gpio.h.

Referenced by LL_GPIO_Init().

__STATIC_INLINE void LL_GPIO_SetPinPull ( GPIO_TypeDef *  GPIOx,
uint32_t  Pin,
uint32_t  Pull 
)

Configure gpio pull-up or pull-down for a dedicated pin on a dedicated port.

Note:
Warning: only one pin can be passed as parameter.
Reference Manual to LL API cross reference:
ODR ODR LL_GPIO_SetPinPull
Parameters:
GPIOxGPIO Port
PinThis parameter can be one of the following values:
PullThis parameter can be one of the following values:
Return values:
None

Definition at line 565 of file stm32f1xx_ll_gpio.h.

References GPIO_PIN_MASK_POS.

Referenced by LL_GPIO_Init().

__STATIC_INLINE void LL_GPIO_SetPinSpeed ( GPIO_TypeDef *  GPIOx,
uint32_t  Pin,
uint32_t  Speed 
)

Configure gpio speed for a dedicated pin on dedicated port.

Note:
I/O speed can be Low, Medium or Fast speed.
Warning: only one pin can be passed as parameter.
Refer to datasheet for frequency specifications and the power supply and load conditions for each speed.
Reference Manual to LL API cross reference:
CRL MODEy LL_GPIO_SetPinSpeed
Reference Manual to LL API cross reference:
CRH MODEy LL_GPIO_SetPinSpeed
Parameters:
GPIOxGPIO Port
PinThis parameter can be one of the following values:
SpeedThis parameter can be one of the following values:
Return values:
None

Definition at line 420 of file stm32f1xx_ll_gpio.h.

Referenced by LL_GPIO_Init().