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.
GPIO Read and Write
[GPIO_Private_Functions]
GPIO Read and Write. More...
Functions | |
| uint8_t | GPIO_ReadInputDataBit_mort (GPIO_TypeDef_mort *GPIOx, uint16_t GPIO_Pin) |
| Reads the specified input port pin. | |
| uint16_t | GPIO_ReadInputData_mort (GPIO_TypeDef_mort *GPIOx) |
| Reads the specified GPIO input data port. | |
| uint8_t | GPIO_ReadOutputDataBit_mort (GPIO_TypeDef_mort *GPIOx, uint16_t GPIO_Pin) |
| Reads the specified output data port bit. | |
| uint16_t | GPIO_ReadOutputData_mort (GPIO_TypeDef_mort *GPIOx) |
| Reads the specified GPIO output data port. | |
| void | GPIO_SetBits_mort (GPIO_TypeDef_mort *GPIOx, uint16_t GPIO_Pin) |
| Sets the selected data port bits. | |
| void | GPIO_ResetBits_mort (GPIO_TypeDef_mort *GPIOx, uint16_t GPIO_Pin) |
| Clears the selected data port bits. | |
| void | GPIO_WriteBit_mort (GPIO_TypeDef_mort *GPIOx, uint16_t GPIO_Pin, BitAction BitVal) |
| Sets or clears the selected data port bit. | |
| void | GPIO_Write_mort (GPIO_TypeDef_mort *GPIOx, uint16_t PortVal) |
| Writes data to the specified GPIO data port. | |
| void | GPIO_ToggleBits_mort (GPIO_TypeDef_mort *GPIOx, uint16_t GPIO_Pin) |
| Toggles the specified GPIO pins. | |
Detailed Description
GPIO Read and Write.
===============================================================================
##### GPIO Read and Write #####
===============================================================================
Function Documentation
| uint16_t GPIO_ReadInputData_mort | ( | GPIO_TypeDef_mort * | GPIOx ) |
Reads the specified GPIO input data port.
- Parameters:
-
GPIOx,: where x can be (A..K) to select the GPIO peripheral for STM32F405xx/407xx and STM32F415xx/417xx devices x can be (A..I) to select the GPIO peripheral for STM32F42xxx/43xxx devices. x can be (A, B, C, D and H) to select the GPIO peripheral for STM32F401xx devices.
- Return values:
-
GPIO input data port value.
Definition at line 349 of file stm32f4xx_gpio_mort.c.
| uint8_t GPIO_ReadInputDataBit_mort | ( | GPIO_TypeDef_mort * | GPIOx, |
| uint16_t | GPIO_Pin | ||
| ) |
Reads the specified input port pin.
- Parameters:
-
GPIOx,: where x can be (A..K) to select the GPIO peripheral for STM32F405xx/407xx and STM32F415xx/417xx devices x can be (A..I) to select the GPIO peripheral for STM32F42xxx/43xxx devices. x can be (A, B, C, D and H) to select the GPIO peripheral for STM32F401xx devices. 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 323 of file stm32f4xx_gpio_mort.c.
| uint16_t GPIO_ReadOutputData_mort | ( | GPIO_TypeDef_mort * | GPIOx ) |
Reads the specified GPIO output data port.
- Parameters:
-
GPIOx,: where x can be (A..K) to select the GPIO peripheral for STM32F405xx/407xx and STM32F415xx/417xx devices x can be (A..I) to select the GPIO peripheral for STM32F42xxx/43xxx devices. x can be (A, B, C, D and H) to select the GPIO peripheral for STM32F401xx devices.
- Return values:
-
GPIO output data port value.
Definition at line 392 of file stm32f4xx_gpio_mort.c.
| uint8_t GPIO_ReadOutputDataBit_mort | ( | GPIO_TypeDef_mort * | GPIOx, |
| uint16_t | GPIO_Pin | ||
| ) |
Reads the specified output data port bit.
- Parameters:
-
GPIOx,: where x can be (A..K) to select the GPIO peripheral for STM32F405xx/407xx and STM32F415xx/417xx devices x can be (A..I) to select the GPIO peripheral for STM32F42xxx/43xxx devices. x can be (A, B, C, D and H) to select the GPIO peripheral for STM32F401xx devices. GPIO_Pin,: specifies the port bit to read. This parameter can be GPIO_Pin_x where x can be (0..15).
- Return values:
-
The output port pin value.
Definition at line 366 of file stm32f4xx_gpio_mort.c.
| void GPIO_ResetBits_mort | ( | GPIO_TypeDef_mort * | GPIOx, |
| uint16_t | GPIO_Pin | ||
| ) |
Clears the selected data port bits.
- Note:
- This functions 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..K) to select the GPIO peripheral for STM32F405xx/407xx and STM32F415xx/417xx devices x can be (A..I) to select the GPIO peripheral for STM32F42xxx/43xxx devices. x can be (A, B, C, D and H) to select the GPIO peripheral for STM32F401xx devices. GPIO_Pin,: specifies the port bits to be written. This parameter can be any combination of GPIO_Pin_x where x can be (0..15).
- Return values:
-
None
Definition at line 433 of file stm32f4xx_gpio_mort.c.
| void GPIO_SetBits_mort | ( | GPIO_TypeDef_mort * | GPIOx, |
| uint16_t | GPIO_Pin | ||
| ) |
Sets the selected data port bits.
- Note:
- This functions 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..K) to select the GPIO peripheral for STM32F405xx/407xx and STM32F415xx/417xx devices x can be (A..I) to select the GPIO peripheral for STM32F42xxx/43xxx devices. x can be (A, B, C, D and H) to select the GPIO peripheral for STM32F401xx devices. GPIO_Pin,: specifies the port bits to be written. This parameter can be any combination of GPIO_Pin_x where x can be (0..15).
- Return values:
-
None
Definition at line 412 of file stm32f4xx_gpio_mort.c.
| void GPIO_ToggleBits_mort | ( | GPIO_TypeDef_mort * | GPIOx, |
| uint16_t | GPIO_Pin | ||
| ) |
Toggles the specified GPIO pins.
- Parameters:
-
GPIOx,: where x can be (A..K) to select the GPIO peripheral for STM32F405xx/407xx and STM32F415xx/417xx devices x can be (A..I) to select the GPIO peripheral for STM32F42xxx/43xxx devices. x can be (A, B, C, D and H) to select the GPIO peripheral for STM32F401xx devices. GPIO_Pin,: Specifies the pins to be toggled.
- Return values:
-
None
Definition at line 496 of file stm32f4xx_gpio_mort.c.
| void GPIO_Write_mort | ( | GPIO_TypeDef_mort * | GPIOx, |
| uint16_t | PortVal | ||
| ) |
Writes data to the specified GPIO data port.
- Parameters:
-
GPIOx,: where x can be (A..K) to select the GPIO peripheral for STM32F405xx/407xx and STM32F415xx/417xx devices x can be (A..I) to select the GPIO peripheral for STM32F42xxx/43xxx devices. x can be (A, B, C, D and H) to select the GPIO peripheral for STM32F401xx devices. PortVal,: specifies the value to be written to the port output data register.
- Return values:
-
None
Definition at line 480 of file stm32f4xx_gpio_mort.c.
| void GPIO_WriteBit_mort | ( | GPIO_TypeDef_mort * | GPIOx, |
| uint16_t | GPIO_Pin, | ||
| BitAction | BitVal | ||
| ) |
Sets or clears the selected data port bit.
- Parameters:
-
GPIOx,: where x can be (A..K) to select the GPIO peripheral for STM32F405xx/407xx and STM32F415xx/417xx devices x can be (A..I) to select the GPIO peripheral for STM32F42xxx/43xxx devices. x can be (A, B, C, D and H) to select the GPIO peripheral for STM32F401xx devices. GPIO_Pin,: specifies the port bit to be written. This parameter can be one of GPIO_Pin_x where x can be (0..15). BitVal,: specifies the value to be written to the selected bit. This parameter can be one of the BitAction enum values: - Bit_RESET: to clear the port pin
- Bit_SET: to set the port pin
- Return values:
-
None
Definition at line 455 of file stm32f4xx_gpio_mort.c.
Generated on Mon Jan 16 2023 14:41:56 by
1.7.2