Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The GPIO driver implements the following C-binding API:

Function

Description

Comments

void HAL_GPIO_Init(GPIO_TypeDef * GPIOx, GPIO_InitTypeDef * GPIO_Init)

Initialise GPIO pins in a specified GPIO port

GPIOx is a pointer to the GPIO port registers; CPIO_Init is a pointer to a data structure describing configuration of a specific pin of the given GPIO port (see below)

void HAL_GPIO_DeInit(GPIO_TypeDef * GPIOx, uint32_t GPIO_Pin)

Reset a GPIO pin to default settings

GPIO_Pin is GPIO_PIN_x, х is one of values from 0 to 15

GPIO_PinState HAL_GPIO_ReadPin (GPIO_TypeDef * GPIOx, uint16_t GPIO_Pin)

Read state of a GPIO pin

GPIO_Pin is GPIO_PIN_x, х is one of values from 0 to 15; returns one of {GPIO_PIN_RESET = 0, GPIO_PIN_SET}

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

Set or clear a GPIO pin

GPIO_Pin is GPIO_PIN_x, х is one of values from 0 to 15; PinState is either GPIO_PIN_RESET or GPIO_PIN_SET

void HAL_GPIO_TogglePin(GPIO_TypeDef * GPIOx, uint16_t GPIO_Pins)

Toggle specified GPIO pins

The GPIO_InitTypeDef data structure used in the HAL_GPIO_Init interface has the following definition:

...