PER Firmware
Loading...
Searching...
No Matches
PHAL_GPIO_InitConfig_t Struct Reference

Configuration entry for GPIO initialization. More...

#include <gpio.h>

Public Attributes

GPIO_TypeDef * bank
 
uint8_t pin
 
PHAL_GPIO_PinType_t type
 
union { 
 
   struct { 
 
      PHAL_GPIO_InputPull_t   pull 
 
   }   input 
 
   struct { 
 
      PHAL_GPIO_OutputSpeed_t   ospeed 
 
      PHAL_GPIO_OutputPull_t   otype 
 
   }   output 
 
   struct { 
 
      uint8_t   af_num 
 
      PHAL_GPIO_OutputSpeed_t   ospeed 
 
      PHAL_GPIO_OutputPull_t   otype 
 
      PHAL_GPIO_InputPull_t   pull 
 
   }   af 
 
config 
 

Detailed Description

Configuration entry for GPIO initialization.

config is a tagged union keyed by PHAL_GPIO_PinType_t type

Member Data Documentation

◆ [struct]

struct { ... } PHAL_GPIO_InitConfig_t::af

Valid when type == GPIO_TYPE_AF

◆ af_num

uint8_t PHAL_GPIO_InitConfig_t::af_num

Alternate function number

◆ bank

GPIO_TypeDef* PHAL_GPIO_InitConfig_t::bank

GPIO Bank for configuration

◆ [union]

union { ... } PHAL_GPIO_InitConfig_t::config

Type-specific configuration for the pin

◆ [struct]

struct { ... } PHAL_GPIO_InitConfig_t::input

Valid when type == GPIO_TYPE_INPUT

◆ ospeed

PHAL_GPIO_OutputSpeed_t PHAL_GPIO_InitConfig_t::ospeed

Output speed (slew rate)

◆ otype

PHAL_GPIO_OutputPull_t PHAL_GPIO_InitConfig_t::otype

Output push/pull

◆ [struct]

struct { ... } PHAL_GPIO_InitConfig_t::output

Valid when type == GPIO_TYPE_OUTPUT

◆ pin

uint8_t PHAL_GPIO_InitConfig_t::pin

Pin Number for configuration, 0-15

◆ pull

PHAL_GPIO_InputPull_t PHAL_GPIO_InitConfig_t::pull

Pull-up/pull-down selection

◆ type

PHAL_GPIO_PinType_t PHAL_GPIO_InitConfig_t::type

Mode of pin


The documentation for this struct was generated from the following file: