STM32F4xx_HAL_Driver  1.8.3

GPIO Read and Write. More...

+ Collaboration diagram for IO operation functions:

Functions

GPIO_PinState HAL_GPIO_ReadPin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Reads the specified input port pin. More...
 
void HAL_GPIO_WritePin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState)
 Sets or clears the selected data port bit. More...
 
void HAL_GPIO_TogglePin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Toggles the specified GPIO pins. More...
 
HAL_StatusTypeDef HAL_GPIO_LockPin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Locks GPIO Pins configuration registers. More...
 
void HAL_GPIO_EXTI_IRQHandler (uint16_t GPIO_Pin)
 This function handles EXTI interrupt request. More...
 
void HAL_GPIO_EXTI_Callback (uint16_t GPIO_Pin)
 EXTI line detection callbacks. More...
 

Detailed Description

GPIO Read and Write.

 ===============================================================================
                       ##### IO operation functions #####
 ===============================================================================

Function Documentation

◆ HAL_GPIO_EXTI_Callback()

__weak void HAL_GPIO_EXTI_Callback ( uint16_t  GPIO_Pin)

EXTI line detection callbacks.

Parameters
GPIO_PinSpecifies the pins connected EXTI line
Return values
None

Definition at line 507 of file stm32f4xx_hal_gpio.c.

◆ HAL_GPIO_EXTI_IRQHandler()

void HAL_GPIO_EXTI_IRQHandler ( uint16_t  GPIO_Pin)

This function handles EXTI interrupt request.

Parameters
GPIO_PinSpecifies the pins connected EXTI line
Return values
None

Definition at line 492 of file stm32f4xx_hal_gpio.c.

◆ HAL_GPIO_LockPin()

HAL_StatusTypeDef HAL_GPIO_LockPin ( GPIO_TypeDef *  GPIOx,
uint16_t  GPIO_Pin 
)

Locks GPIO Pins configuration registers.

Note
The locked registers are GPIOx_MODER, GPIOx_OTYPER, GPIOx_OSPEEDR, GPIOx_PUPDR, GPIOx_AFRL and GPIOx_AFRH.
The configuration of the locked GPIO pins can no longer be modified until the next reset.
Parameters
GPIOxwhere x can be (A..F) to select the GPIO peripheral for STM32F4 family
GPIO_Pinspecifies the port bit to be locked. This parameter can be any combination of GPIO_PIN_x where x can be (0..15).
Return values
None

Definition at line 458 of file stm32f4xx_hal_gpio.c.

◆ HAL_GPIO_ReadPin()

GPIO_PinState HAL_GPIO_ReadPin ( GPIO_TypeDef *  GPIOx,
uint16_t  GPIO_Pin 
)

Reads the specified input port pin.

Parameters
GPIOxwhere x can be (A..K) to select the GPIO peripheral for STM32F429X device or x can be (A..I) to select the GPIO peripheral for STM32F40XX and STM32F427X devices.
GPIO_Pinspecifies the port bit to read. This parameter can be GPIO_PIN_x where x can be (0..15).
Return values
Theinput port pin value.

Definition at line 375 of file stm32f4xx_hal_gpio.c.

◆ HAL_GPIO_TogglePin()

void HAL_GPIO_TogglePin ( GPIO_TypeDef *  GPIOx,
uint16_t  GPIO_Pin 
)

Toggles the specified GPIO pins.

Parameters
GPIOxWhere x can be (A..K) to select the GPIO peripheral for STM32F429X device or x can be (A..I) to select the GPIO peripheral for STM32F40XX and STM32F427X devices.
GPIO_PinSpecifies the pins to be toggled.
Return values
None

Definition at line 433 of file stm32f4xx_hal_gpio.c.

◆ HAL_GPIO_WritePin()

void HAL_GPIO_WritePin ( GPIO_TypeDef *  GPIOx,
uint16_t  GPIO_Pin,
GPIO_PinState  PinState 
)

Sets or clears the selected data port bit.

Note
This function uses GPIOx_BSRR register to allow atomic read/modify accesses. In this way, there is no risk of an IRQ occurring between the read and the modify access.
Parameters
GPIOxwhere x can be (A..K) to select the GPIO peripheral for STM32F429X device or x can be (A..I) to select the GPIO peripheral for STM32F40XX and STM32F427X devices.
GPIO_Pinspecifies the port bit to be written. This parameter can be one of GPIO_PIN_x where x can be (0..15).
PinStatespecifies the value to be written to the selected bit. This parameter can be one of the GPIO_PinState enum values:
  • GPIO_PIN_RESET: to clear the port pin
  • GPIO_PIN_SET: to set the port pin
Return values
None

Definition at line 410 of file stm32f4xx_hal_gpio.c.