GPIO - General Purpose Input/Output

Description

General Purpose Input/Output (GPIO) API.

This module contains functions to control the GPIO peripheral of Silicon Labs 32-bit MCUs and SoCs. The GPIO peripheral is used for pin configuration and direct pin manipulation and sensing as well as routing for peripheral pin connections.

Functions

void GPIO_DbgLocationSet (unsigned int location)
Sets the pin location of the debug pins (Serial Wire interface).
void GPIO_DriveModeSet ( GPIO_Port_TypeDef port, GPIO_DriveMode_TypeDef mode)
Sets drive mode for a GPIO port.
void GPIO_ExtIntConfig ( GPIO_Port_TypeDef port, unsigned int pin, unsigned int intNo, bool risingEdge, bool fallingEdge, bool enable)
Configure the GPIO external pin interrupt.
void GPIO_PinModeSet ( GPIO_Port_TypeDef port, unsigned int pin, GPIO_Mode_TypeDef mode, unsigned int out)
Set the mode for a GPIO pin.
GPIO_Mode_TypeDef GPIO_PinModeGet ( GPIO_Port_TypeDef port, unsigned int pin)
Get the mode for a GPIO pin.
void GPIO_EM4EnablePinWakeup (uint32_t pinmask, uint32_t polaritymask)
Enable GPIO pin wake-up from EM4.
void GPIO_DbgSWDClkEnable (bool enable)
Enable/disable serial wire clock pin.
void GPIO_DbgSWDIOEnable (bool enable)
Enable/disable serial wire data I/O pin.
void GPIO_DbgSWOEnable (bool enable)
Enable/Disable serial wire output pin.
void GPIO_EM4DisablePinWakeup (uint32_t pinmask)
Disable GPIO pin wake-up from EM4.
uint32_t GPIO_EM4GetPinWakeupCause (void)
Check which GPIO pin(s) that caused a wake-up from EM4.
void GPIO_EM4SetPinRetention (bool enable)
Enable GPIO pin retention of output enable, output value, pull enable, and pull direction in EM4.
void GPIO_InputSenseSet (uint32_t val, uint32_t mask)
Enable/disable input sensing.
void GPIO_IntClear (uint32_t flags)
Clear one or more pending GPIO interrupts.
void GPIO_IntDisable (uint32_t flags)
Disable one or more GPIO interrupts.
void GPIO_IntEnable (uint32_t flags)
Enable one or more GPIO interrupts.
uint32_t GPIO_IntGet (void)
Get pending GPIO interrupts.
uint32_t GPIO_IntGetEnabled (void)
Get enabled and pending GPIO interrupt flags.
void GPIO_IntSet (uint32_t flags)
Set one or more pending GPIO interrupts from SW.
void GPIO_Lock (void)
Locks the GPIO configuration.
unsigned int GPIO_PinInGet ( GPIO_Port_TypeDef port, unsigned int pin)
Read the pad value for a single pin in a GPIO port.
void GPIO_PinLock ( GPIO_Port_TypeDef port, unsigned int pin)
Lock all GPIO configuration settings for a given pin.