Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TUKS-COURSE-TIMER by
IO operation functions
[GPIO Exported Functions]
GPIO Read, Write, Toggle, Lock and EXTI management functions. More...
Functions | |
GPIO_PinState | HAL_GPIO_ReadPin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Read the specified input port pin. | |
void | HAL_GPIO_WritePin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState) |
Set or clear the selected data port bit. | |
void | HAL_GPIO_TogglePin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Toggle the specified GPIO pin. | |
HAL_StatusTypeDef | HAL_GPIO_LockPin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
Lock GPIO Pins configuration registers. | |
void | HAL_GPIO_EXTI_IRQHandler (uint16_t GPIO_Pin) |
Handle EXTI interrupt request. | |
__weak void | HAL_GPIO_EXTI_Callback (uint16_t GPIO_Pin) |
EXTI line detection callback. |
Detailed Description
GPIO Read, Write, Toggle, Lock and EXTI management functions.
=============================================================================== ##### IO operation functions ##### ===============================================================================
Function Documentation
__weak void HAL_GPIO_EXTI_Callback | ( | uint16_t | GPIO_Pin ) |
EXTI line detection callback.
- Parameters:
-
GPIO_Pin,: Specifies the port pin connected to corresponding EXTI line.
- Return values:
-
None
Definition at line 542 of file stm32l4xx_hal_gpio.c.
void HAL_GPIO_EXTI_IRQHandler | ( | uint16_t | GPIO_Pin ) |
Handle EXTI interrupt request.
- Parameters:
-
GPIO_Pin,: Specifies the port pin connected to corresponding EXTI line.
- Return values:
-
None
Definition at line 527 of file stm32l4xx_hal_gpio.c.
HAL_StatusTypeDef HAL_GPIO_LockPin | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | GPIO_Pin | ||
) |
Lock 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:
-
GPIOx,: where x can be (A..H) to select the GPIO peripheral for STM32L4 family GPIO_Pin,: specifies the port bits 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 493 of file stm32l4xx_hal_gpio.c.
GPIO_PinState HAL_GPIO_ReadPin | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | GPIO_Pin | ||
) |
Read the specified input port pin.
- Parameters:
-
GPIOx,: where x can be (A..H) to select the GPIO peripheral for STM32L4 family GPIO_Pin,: specifies the port bit to read. This parameter can be GPIO_PIN_x where x can be (0..15).
- Return values:
-
The input port pin value.
Definition at line 418 of file stm32l4xx_hal_gpio.c.
void HAL_GPIO_TogglePin | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | GPIO_Pin | ||
) |
Toggle the specified GPIO pin.
- Parameters:
-
GPIOx,: where x can be (A..H) to select the GPIO peripheral for STM32L4 family GPIO_Pin,: specifies the pin to be toggled.
- Return values:
-
None
Definition at line 474 of file stm32l4xx_hal_gpio.c.
void HAL_GPIO_WritePin | ( | GPIO_TypeDef * | GPIOx, |
uint16_t | GPIO_Pin, | ||
GPIO_PinState | PinState | ||
) |
Set or clear the selected data port bit.
- Note:
- This function uses GPIOx_BSRR and GPIOx_BRR registers 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:
-
GPIOx,: where x can be (A..H) to select the GPIO peripheral for STM32L4 family GPIO_Pin,: specifies the port bit to be written. This parameter can be one of GPIO_PIN_x where x can be (0..15). PinState,: specifies 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 452 of file stm32l4xx_hal_gpio.c.
Generated on Tue Jul 12 2022 17:38:53 by
