Functions

GPIO Read and Write. More...

Collaboration diagram for GPIO Read and Write:

Functions

uint16_t GPIO_ReadInputData (GPIO_TypeDef *GPIOx)
 Reads the specified GPIO input data port. More...
 
uint8_t GPIO_ReadInputDataBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Reads the specified input port pin. More...
 
uint16_t GPIO_ReadOutputData (GPIO_TypeDef *GPIOx)
 Reads the specified GPIO output data port. More...
 
uint8_t GPIO_ReadOutputDataBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Reads the specified output data port bit. More...
 
void GPIO_ResetBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Clears the selected data port bits. More...
 
void GPIO_SetBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Sets the selected data port bits. More...
 
void GPIO_ToggleBits (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin)
 Toggles the specified GPIO pins.. More...
 
void GPIO_Write (GPIO_TypeDef *GPIOx, uint16_t PortVal)
 Writes data to the specified GPIO data port. More...
 
void GPIO_WriteBit (GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, BitAction BitVal)
 Sets or clears the selected data port bit. More...
 

Detailed Description

GPIO Read and Write.

 ===============================================================================
                         ##### GPIO Read and Write #####
 ===============================================================================  

Function Documentation

uint16_t GPIO_ReadInputData ( GPIO_TypeDef GPIOx)

Reads the specified GPIO input data port.

Reads the specified input port pin.

Parameters
GPIOxwhere 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
GPIOinput data port value.
Parameters
GPIOxwhere x can be (A..I) to select the GPIO peripheral for STM32F40xx/41xx and STM32F427x/437x devices.
Return values
GPIOinput data port value.
Parameters
GPIOxwhere x can be (A, B, C, D, E or F) to select the GPIO peripheral.
Return values
Theinput port pin value.

Definition at line 349 of file CMSIS/CM4/DeviceSupport/ST/STM32F4xx/stm32f4xx_gpio.c.

uint8_t GPIO_ReadInputDataBit ( 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 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_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.
Parameters
GPIOxwhere x can be (A..I) to select the GPIO peripheral for STM32F40xx/41xx and STM32F427x/437x 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.
Parameters
GPIOxwhere x can be (A, B, C, D, E or F) to select the GPIO peripheral.
GPIO_Pinspecifies the port bit to read.
Note
This parameter can be GPIO_Pin_x where x can be : (0..15) for GPIOA, GPIOB, GPIOC, GPIOD or GPIOE; (0..2, 4, 6, 9..10) for GPIOF.
Return values
Theinput port pin value.

Definition at line 323 of file CMSIS/CM4/DeviceSupport/ST/STM32F4xx/stm32f4xx_gpio.c.

uint16_t GPIO_ReadOutputData ( GPIO_TypeDef GPIOx)

Reads the specified GPIO output data port.

Parameters
GPIOxwhere 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
GPIOoutput data port value.
Parameters
GPIOxwhere x can be (A..I) to select the GPIO peripheral for STM32F40xx/41xx and STM32F427x/437x devices.
Return values
GPIOoutput data port value.
Parameters
GPIOxwhere x can be (A, B, C, D, E or F) to select the GPIO peripheral.
Return values
GPIOoutput data port value.

Definition at line 392 of file CMSIS/CM4/DeviceSupport/ST/STM32F4xx/stm32f4xx_gpio.c.

uint8_t GPIO_ReadOutputDataBit ( GPIO_TypeDef GPIOx,
uint16_t  GPIO_Pin 
)

Reads the specified output data port bit.

Parameters
GPIOxwhere 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_Pinspecifies the port bit to read. This parameter can be GPIO_Pin_x where x can be (0..15).
Return values
Theoutput port pin value.
Parameters
GPIOxwhere x can be (A..I) to select the GPIO peripheral for STM32F40xx/41xx and STM32F427x/437x devices.
GPIO_Pinspecifies the port bit to read. This parameter can be GPIO_Pin_x where x can be (0..15).
Return values
Theoutput port pin value.
Parameters
GPIOxwhere x can be (A, B, C, D, E or F) to select the GPIO peripheral.
GPIO_PinSpecifies the port bit to read.
Note
This parameter can be GPIO_Pin_x where x can be : (0..15) for GPIOA, GPIOB, GPIOC, GPIOD or GPIOE; (0..2, 4, 6, 9..10) for GPIOF.
Return values
Theoutput port pin value.

Definition at line 366 of file CMSIS/CM4/DeviceSupport/ST/STM32F4xx/stm32f4xx_gpio.c.

void GPIO_ResetBits ( GPIO_TypeDef 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
GPIOxwhere 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_Pinspecifies 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
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
GPIOxwhere x can be (A..I) to select the GPIO peripheral for STM32F40xx/41xx and STM32F427x/437x devices.
GPIO_Pinspecifies 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
Parameters
GPIOxwhere x can be (A, B, C, D, E or F) to select the GPIO peripheral.
GPIO_Pinspecifies the port bits to be written.
Note
This parameter can be GPIO_Pin_x where x can be : (0..15) for GPIOA, GPIOB, GPIOC, GPIOD or GPIOE; (0..2, 4, 6, 9..10) for GPIOF.
Return values
None

Definition at line 433 of file CMSIS/CM4/DeviceSupport/ST/STM32F4xx/stm32f4xx_gpio.c.

void GPIO_SetBits ( GPIO_TypeDef 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
GPIOxwhere 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_Pinspecifies 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
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
GPIOxwhere x can be (A..I) to select the GPIO peripheral for STM32F40xx/41xx and STM32F427x/437x devices.
GPIO_Pinspecifies 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
Parameters
GPIOxwhere x can be (A, B, C, D, E or F) to select the GPIO peripheral.
GPIO_Pinspecifies the port bits to be written.
Note
This parameter can be GPIO_Pin_x where x can be : (0..15) for GPIOA, GPIOB, GPIOC, GPIOD or GPIOE; (0..2, 4, 6, 9..10) for GPIOF.
Return values
None

Definition at line 412 of file CMSIS/CM4/DeviceSupport/ST/STM32F4xx/stm32f4xx_gpio.c.

void GPIO_ToggleBits ( 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 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_PinSpecifies the pins to be toggled.
Return values
None
Parameters
GPIOxwhere x can be (A..I) to select the GPIO peripheral for STM32F40xx/41xx and STM32F427x/437x devices.
GPIO_PinSpecifies the pins to be toggled.
Return values
None

Definition at line 496 of file CMSIS/CM4/DeviceSupport/ST/STM32F4xx/stm32f4xx_gpio.c.

void GPIO_Write ( GPIO_TypeDef GPIOx,
uint16_t  PortVal 
)

Writes data to the specified GPIO data port.

Parameters
GPIOxwhere 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.
PortValspecifies the value to be written to the port output data register.
Return values
None
Parameters
GPIOxwhere x can be (A..I) to select the GPIO peripheral for STM32F40xx/41xx and STM32F427x/437x devices.
PortValspecifies the value to be written to the port output data register.
Return values
None
Parameters
GPIOxwhere x can be (A, B, C, D, E or F) to select the GPIO peripheral.
PortValspecifies the value to be written to the port output data register.
Return values
None

Definition at line 480 of file CMSIS/CM4/DeviceSupport/ST/STM32F4xx/stm32f4xx_gpio.c.

void GPIO_WriteBit ( GPIO_TypeDef GPIOx,
uint16_t  GPIO_Pin,
BitAction  BitVal 
)

Sets or clears the selected data port bit.

Parameters
GPIOxwhere 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_Pinspecifies the port bit to be written. This parameter can be one of GPIO_Pin_x where x can be (0..15).
BitValspecifies 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
Parameters
GPIOxwhere x can be (A..I) to select the GPIO peripheral for STM32F40xx/41xx and STM32F427x/437x devices.
GPIO_Pinspecifies the port bit to be written. This parameter can be one of GPIO_Pin_x where x can be (0..15).
BitValspecifies 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
Parameters
GPIOxwhere x can be (A, B, C, D, E or F) to select the GPIO peripheral.
GPIO_Pinspecifies the port bit to be written.
Note
This parameter can be GPIO_Pin_x where x can be : (0..15) for GPIOA, GPIOB, GPIOC, GPIOD or GPIOE; (0..2, 4, 6, 9..10) for GPIOF.
Parameters
BitValspecifies the value to be written to the selected bit. This parameter can be one of the BitAction enumeration values:
  • Bit_RESET: to clear the port pin
  • Bit_SET: to set the port pin
Return values
None

Definition at line 455 of file CMSIS/CM4/DeviceSupport/ST/STM32F4xx/stm32f4xx_gpio.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:28