BSPACM  20150113
Board Support Package for ARM Cortex-M Microcontrollers
Data Fields
sBSPACMdeviceEFM32pinmux Struct Reference

#include </prj/arm/bspacm/device/efm32/include/bspacm/periph/gpio.h>

Data Fields

GPIO_P_TypeDef * port
 
uint8_t pin
 
uint8_t mode
 

Detailed Description

Core structure associating a GPIO port, pin, and port control function.

Note
An all-zero pinmux denotes an unconfigured GPIO due to port being null.

Example to configure PD0 as output (push/pull):

.tx_pinmux = {
.port = GPIO->P + gpioPortD,
.pin = 0,
.mode = gpioModePushPull,
},

Field Documentation

uint8_t sBSPACMdeviceEFM32pinmux::mode

The mode to which the pin should be configured.

Note
This is the 4-bit value independent of pin; the value will be shifted and placed in either the MODEL or MODEH register depending on pin. As all pins use the same value/behavior map, and EMLIB is good enough to provide an equivalent enumeration that is pin-independent, use the constants from <em_gpio.h> GPIO_Mode_TypeDef.
uint8_t sBSPACMdeviceEFM32pinmux::pin

The pin number, ranging from 0 through 15.

GPIO_P_TypeDef* sBSPACMdeviceEFM32pinmux::port

The port that is responsible for the pin. Leave this null if the pinmux is unused for the specific configuration that contains it. Example:


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