|
PER Firmware
|
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 | |
Configuration entry for GPIO initialization.
config is a tagged union keyed by PHAL_GPIO_PinType_t type
| struct { ... } PHAL_GPIO_InitConfig_t::af |
Valid when type == GPIO_TYPE_AF
| uint8_t PHAL_GPIO_InitConfig_t::af_num |
Alternate function number
| GPIO_TypeDef* PHAL_GPIO_InitConfig_t::bank |
GPIO Bank for configuration
| union { ... } PHAL_GPIO_InitConfig_t::config |
Type-specific configuration for the pin
| struct { ... } PHAL_GPIO_InitConfig_t::input |
Valid when type == GPIO_TYPE_INPUT
| PHAL_GPIO_OutputSpeed_t PHAL_GPIO_InitConfig_t::ospeed |
Output speed (slew rate)
| PHAL_GPIO_OutputPull_t PHAL_GPIO_InitConfig_t::otype |
Output push/pull
| struct { ... } PHAL_GPIO_InitConfig_t::output |
Valid when type == GPIO_TYPE_OUTPUT
| uint8_t PHAL_GPIO_InitConfig_t::pin |
Pin Number for configuration, 0-15
| PHAL_GPIO_InputPull_t PHAL_GPIO_InitConfig_t::pull |
Pull-up/pull-down selection
| PHAL_GPIO_PinType_t PHAL_GPIO_InitConfig_t::type |
Mode of pin