General-purpose I/Os (GPIO)
ï‚· __IO uint32_t GPIO_TypeDef::AFR[2]
ï€ GPIO alternate function low register, Address offset: 0x20-0x24
ï‚· __IO uint16_t GPIO_TypeDef::BRR
ï€ GPIO bit reset register, Address offset: 0x28
ï‚· uint16_t GPIO_TypeDef::RESERVED3
ï€ Reserved, 0x2A
12.1.2 GPIO_InitTypeDef
GPIO_InitTypeDef is defined in the stm32f30x_gpio.h
Data Fields
ï‚· uint32_t GPIO_Pin
ï‚· GPIOMode_TypeDef GPIO_Mode
ï‚· GPIOSpeed_TypeDef GPIO_Speed
ï‚· GPIOOType_TypeDef GPIO_OType
ï‚· GPIOPuPd_TypeDef GPIO_PuPd
Field Documentation
ï‚· uint32_t GPIO_InitTypeDef::GPIO_Pin
ï€ Specifies the GPIO pins to be configured. This parameter can be any value of
GPIO_pins_define
ï‚· GPIOMode_TypeDef GPIO_InitTypeDef::GPIO_Mode
ï€ Specifies the operating mode for the selected pins. This parameter can be a
value of GPIOMode_TypeDef
ï‚· GPIOSpeed_TypeDef GPIO_InitTypeDef::GPIO_Speed
ï€ Specifies the speed for the selected pins. This parameter can be a value of
GPIOSpeed_TypeDef
ï‚· GPIOOType_TypeDef GPIO_InitTypeDef::GPIO_OType
ï€ Specifies the operating output type for the selected pins. This parameter can be
a value of GPIOOType_TypeDef
ï‚· GPIOPuPd_TypeDef GPIO_InitTypeDef::GPIO_PuPd
ï€ Specifies the operating Pull-up/Pull down for the selected pins. This parameter
can be a value of GPIOPuPd_TypeDef
12.2 GPIO Firmware driver API description
The following section lists the various functions of the GPIO library.
12.2.1 How to use this driver
1. Enable the GPIO AHB clock using RCC_AHBPeriphClockCmd()
2. Configure the GPIO pin(s) using GPIO_Init() Four possible configuration are available
for each pin: