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.
IO operation functions
[GPIO Exported Functions]
GPIO Read and Write. More...
Functions | |
| GPIO_PinState | HAL_GPIO_ReadPin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
| Reads the specified input port pin. | |
| void | HAL_GPIO_WritePin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState) |
| Sets or clears the selected data port bit. | |
| void | HAL_GPIO_TogglePin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
| Toggles the specified GPIO pin. | |
| HAL_StatusTypeDef | HAL_GPIO_LockPin (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin) |
| Locks GPIO Pins configuration registers. | |
| void | HAL_GPIO_EXTI_IRQHandler (uint16_t GPIO_Pin) |
| This function handles EXTI interrupt request. | |
| __weak void | HAL_GPIO_EXTI_Callback (uint16_t GPIO_Pin) |
| EXTI line detection callback. | |
Detailed Description
GPIO Read and Write.
===============================================================================
##### IO operation functions #####
===============================================================================
[..]
This subsection provides a set of functions allowing to manage the GPIOs.
Function Documentation
| __weak void HAL_GPIO_EXTI_Callback | ( | uint16_t | GPIO_Pin ) |
EXTI line detection callback.
- Parameters:
-
GPIO_Pin,: Specifies the pins connected EXTI line
- Return values:
-
None
Definition at line 570 of file stm32f1xx_hal_gpio.c.
| void HAL_GPIO_EXTI_IRQHandler | ( | uint16_t | GPIO_Pin ) |
This function handles EXTI interrupt request.
- Parameters:
-
GPIO_Pin,: Specifies the pins connected EXTI line
- Return values:
-
None
Definition at line 555 of file stm32f1xx_hal_gpio.c.
| HAL_StatusTypeDef HAL_GPIO_LockPin | ( | GPIO_TypeDef * | GPIOx, |
| uint16_t | GPIO_Pin | ||
| ) |
Locks GPIO Pins configuration registers.
- Note:
- The locking mechanism allows the IO configuration to be frozen. When the LOCK sequence has been applied on a port bit, it is no longer possible to modify the value of the port bit until the next reset.
- Parameters:
-
GPIOx,: where x can be (A..G depending on device used) to select the GPIO peripheral GPIO_Pin,: specifies 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 521 of file stm32f1xx_hal_gpio.c.
| GPIO_PinState HAL_GPIO_ReadPin | ( | GPIO_TypeDef * | GPIOx, |
| uint16_t | GPIO_Pin | ||
| ) |
Reads the specified input port pin.
- Parameters:
-
GPIOx,: where x can be (A..G depending on device used) to select the GPIO peripheral 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 447 of file stm32f1xx_hal_gpio.c.
| void HAL_GPIO_TogglePin | ( | GPIO_TypeDef * | GPIOx, |
| uint16_t | GPIO_Pin | ||
| ) |
Toggles the specified GPIO pin.
- Parameters:
-
GPIOx,: where x can be (A..G depending on device used) to select the GPIO peripheral GPIO_Pin,: Specifies the pins to be toggled.
- Return values:
-
None
Definition at line 503 of file stm32f1xx_hal_gpio.c.
| 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:
-
GPIOx,: where x can be (A..G depending on device used) to select the GPIO peripheral 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_BIT_RESET: to clear the port pin
- GPIO_BIT_SET: to set the port pin
- Return values:
-
None
Definition at line 481 of file stm32f1xx_hal_gpio.c.
Generated on Tue Jul 12 2022 15:37:32 by
1.7.2