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_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_PinOutClear ( GPIO_Port_TypeDef port, unsigned int pin) |
Set a single pin in GPIO data out port register to 0.
|
|
unsigned int | GPIO_PinOutGet ( GPIO_Port_TypeDef port, unsigned int pin) |
Get current setting for a pin in a GPIO port data out register.
|
|
void | GPIO_PinOutSet ( GPIO_Port_TypeDef port, unsigned int pin) |
Set a single pin in GPIO data out register to 1.
|
|
void | GPIO_PinOutToggle ( GPIO_Port_TypeDef port, unsigned int pin) |
Toggle a single pin in GPIO port data out register.
|
|
uint32_t | GPIO_PortInGet ( GPIO_Port_TypeDef port) |
Read the pad values for GPIO port.
|
|
void | GPIO_PortOutClear ( GPIO_Port_TypeDef port, uint32_t pins) |
Set bits in DOUT register for a port to 0.
|
|
uint32_t | GPIO_PortOutGet ( GPIO_Port_TypeDef port) |
Get current setting for a GPIO port data out register.
|
|
void | GPIO_PortOutSet ( GPIO_Port_TypeDef port, uint32_t pins) |
Set bits GPIO data out register to 1.
|
|
void | GPIO_PortOutSetVal ( GPIO_Port_TypeDef port, uint32_t val, uint32_t mask) |
Set GPIO port data out register.
|
|
void | GPIO_PortOutToggle ( GPIO_Port_TypeDef port, uint32_t pins) |
Toggle pins in GPIO port data out register.
|
|
void | GPIO_SlewrateSet ( GPIO_Port_TypeDef port, uint32_t slewrate, uint32_t slewrateAlt) |
Set slewrate for pins on a GPIO port.
|
|
void | GPIO_Unlock (void) |
Unlocks the GPIO configuration.
|
|
void | GPIO_IntConfig ( GPIO_Port_TypeDef port, unsigned int pin, bool risingEdge, bool fallingEdge, bool enable) |
Configure GPIO interrupt.
|
|
Enumerations |
|
enum |
GPIO_Port_TypeDef
{
gpioPortA = 0, gpioPortB = 1, gpioPortC = 2, gpioPortD = 3 } |
GPIO ports IDs.
|
|
enum |
GPIO_Mode_TypeDef
{
gpioModeDisabled = _GPIO_P_MODEL_MODE0_DISABLED, gpioModeInput = _GPIO_P_MODEL_MODE0_INPUT, gpioModeInputPull = _GPIO_P_MODEL_MODE0_INPUTPULL, gpioModeInputPullFilter = _GPIO_P_MODEL_MODE0_INPUTPULLFILTER, gpioModePushPull = _GPIO_P_MODEL_MODE0_PUSHPULL, gpioModePushPullAlternate = _GPIO_P_MODEL_MODE0_PUSHPULLALT, gpioModeWiredOr = _GPIO_P_MODEL_MODE0_WIREDOR, gpioModeWiredOrPullDown = _GPIO_P_MODEL_MODE0_WIREDORPULLDOWN, gpioModeWiredAnd = _GPIO_P_MODEL_MODE0_WIREDAND, gpioModeWiredAndFilter = _GPIO_P_MODEL_MODE0_WIREDANDFILTER, gpioModeWiredAndPullUp = _GPIO_P_MODEL_MODE0_WIREDANDPULLUP, gpioModeWiredAndPullUpFilter = _GPIO_P_MODEL_MODE0_WIREDANDPULLUPFILTER, gpioModeWiredAndAlternate = _GPIO_P_MODEL_MODE0_WIREDANDALT, gpioModeWiredAndAlternateFilter = _GPIO_P_MODEL_MODE0_WIREDANDALTFILTER, gpioModeWiredAndAlternatePullUp = _GPIO_P_MODEL_MODE0_WIREDANDALTPULLUP, gpioModeWiredAndAlternatePullUpFilter = _GPIO_P_MODEL_MODE0_WIREDANDALTPULLUPFILTER } |
Pin mode.
|
|