MSPM0G1X0X_G3X0X Driver Library  1.20.01.06
Modules | Enumerations | Functions
General Purpose Input/Output (GPIO)
Collaboration diagram for General Purpose Input/Output (GPIO):

Modules

 DL_GPIO_PIN
 
 DL_GPIO_EDGE_POLARITY
 
 DL_GPIO_INPUT_FILTER
 

Enumerations

enum  DL_GPIO_INVERSION {
  DL_GPIO_INVERSION_ENABLE = IOMUX_PINCM_INV_ENABLE,
  DL_GPIO_INVERSION_DISABLE = IOMUX_PINCM_INV_DISABLE
}
 
enum  DL_GPIO_DRIVE_STRENGTH {
  DL_GPIO_DRIVE_STRENGTH_LOW = IOMUX_PINCM_DRV_DRVVAL0,
  DL_GPIO_DRIVE_STRENGTH_HIGH = IOMUX_PINCM_DRV_DRVVAL1
}
 
enum  DL_GPIO_RESISTOR {
  DL_GPIO_RESISTOR_NONE,
  DL_GPIO_RESISTOR_PULL_UP,
  DL_GPIO_RESISTOR_PULL_DOWN
}
 
enum  DL_GPIO_HYSTERESIS {
  DL_GPIO_HYSTERESIS_ENABLE = IOMUX_PINCM_HYSTEN_ENABLE,
  DL_GPIO_HYSTERESIS_DISABLE = IOMUX_PINCM_HYSTEN_DISABLE
}
 
enum  DL_GPIO_WAKEUP {
  DL_GPIO_WAKEUP_ENABLE = IOMUX_PINCM_WUEN_ENABLE,
  DL_GPIO_WAKEUP_DISABLE = IOMUX_PINCM_WUEN_DISABLE,
  DL_GPIO_WAKEUP_ON_0 = (IOMUX_PINCM_WUEN_ENABLE | IOMUX_PINCM_WCOMP_MATCH0),
  DL_GPIO_WAKEUP_ON_1 = (IOMUX_PINCM_WUEN_ENABLE | IOMUX_PINCM_WCOMP_MATCH1)
}
 
enum  DL_GPIO_HIZ {
  DL_GPIO_HIZ_ENABLE = IOMUX_PINCM_HIZ1_ENABLE,
  DL_GPIO_HIZ_DISABLE = IOMUX_PINCM_HIZ1_DISABLE
}
 
enum  DL_GPIO_EVENT_ROUTE {
  DL_GPIO_EVENT_ROUTE_1 = 0,
  DL_GPIO_EVENT_ROUTE_2 = 12
}
 
enum  DL_GPIO_PUBLISHER_INDEX {
  DL_GPIO_PUBLISHER_INDEX_0 = 0,
  DL_GPIO_PUBLISHER_INDEX_1 = 1
}
 
enum  DL_GPIO_SUBSCRIBER_INDEX {
  DL_GPIO_SUBSCRIBER_INDEX_0 = 0,
  DL_GPIO_SUBSCRIBER_INDEX_1 = 1
}
 
enum  DL_GPIO_SUBSCRIBER_OUT_POLICY {
  DL_GPIO_SUBSCRIBER_OUT_POLICY_SET = GPIO_SUB0CFG_OUTPOLICY_SET,
  DL_GPIO_SUBSCRIBER_OUT_POLICY_CLEAR = GPIO_SUB0CFG_OUTPOLICY_CLR,
  DL_GPIO_SUBSCRIBER_OUT_POLICY_TOGGLE = GPIO_SUB0CFG_OUTPOLICY_TOGGLE
}
 
enum  DL_GPIO_SUBSCRIBERx_PIN {
  DL_GPIO_SUBSCRIBER0_PIN_0 = 0x00000000,
  DL_GPIO_SUBSCRIBER0_PIN_1 = 0x00010000,
  DL_GPIO_SUBSCRIBER0_PIN_2 = 0x00020000,
  DL_GPIO_SUBSCRIBER0_PIN_3 = 0x00030000,
  DL_GPIO_SUBSCRIBER0_PIN_4 = 0x00040000,
  DL_GPIO_SUBSCRIBER0_PIN_5 = 0x00050000,
  DL_GPIO_SUBSCRIBER0_PIN_6 = 0x00060000,
  DL_GPIO_SUBSCRIBER0_PIN_7 = 0x00070000,
  DL_GPIO_SUBSCRIBER0_PIN_8 = 0x00080000,
  DL_GPIO_SUBSCRIBER0_PIN_9 = 0x00090000,
  DL_GPIO_SUBSCRIBER0_PIN_10 = 0x000A0000,
  DL_GPIO_SUBSCRIBER0_PIN_11 = 0x000B0000,
  DL_GPIO_SUBSCRIBER0_PIN_12 = 0x000C0000,
  DL_GPIO_SUBSCRIBER0_PIN_13 = 0x000D0000,
  DL_GPIO_SUBSCRIBER0_PIN_14 = 0x000E0000,
  DL_GPIO_SUBSCRIBER0_PIN_15 = 0x000F0000,
  DL_GPIO_SUBSCRIBER1_PIN_16 = 0x00000000,
  DL_GPIO_SUBSCRIBER1_PIN_17 = 0x00010000,
  DL_GPIO_SUBSCRIBER1_PIN_18 = 0x00020000,
  DL_GPIO_SUBSCRIBER1_PIN_19 = 0x00030000,
  DL_GPIO_SUBSCRIBER1_PIN_20 = 0x00040000,
  DL_GPIO_SUBSCRIBER1_PIN_21 = 0x00050000,
  DL_GPIO_SUBSCRIBER1_PIN_22 = 0x00060000,
  DL_GPIO_SUBSCRIBER1_PIN_23 = 0x00070000,
  DL_GPIO_SUBSCRIBER1_PIN_24 = 0x00080000,
  DL_GPIO_SUBSCRIBER1_PIN_25 = 0x00090000,
  DL_GPIO_SUBSCRIBER1_PIN_26 = 0x000A0000,
  DL_GPIO_SUBSCRIBER1_PIN_27 = 0x000B0000,
  DL_GPIO_SUBSCRIBER1_PIN_28 = 0x000C0000,
  DL_GPIO_SUBSCRIBER1_PIN_29 = 0x000D0000,
  DL_GPIO_SUBSCRIBER1_PIN_30 = 0x000E0000,
  DL_GPIO_SUBSCRIBER1_PIN_31 = 0x000F0000
}
 
enum  DL_GPIO_IIDX {
  DL_GPIO_IIDX_DIO0 = GPIO_CPU_INT_IIDX_STAT_DIO0,
  DL_GPIO_IIDX_DIO1 = GPIO_CPU_INT_IIDX_STAT_DIO1,
  DL_GPIO_IIDX_DIO2 = GPIO_CPU_INT_IIDX_STAT_DIO2,
  DL_GPIO_IIDX_DIO3 = GPIO_CPU_INT_IIDX_STAT_DIO3,
  DL_GPIO_IIDX_DIO4 = GPIO_CPU_INT_IIDX_STAT_DIO4,
  DL_GPIO_IIDX_DIO5 = GPIO_CPU_INT_IIDX_STAT_DIO5,
  DL_GPIO_IIDX_DIO6 = GPIO_CPU_INT_IIDX_STAT_DIO6,
  DL_GPIO_IIDX_DIO7 = GPIO_CPU_INT_IIDX_STAT_DIO7,
  DL_GPIO_IIDX_DIO8 = GPIO_CPU_INT_IIDX_STAT_DIO8,
  DL_GPIO_IIDX_DIO9 = GPIO_CPU_INT_IIDX_STAT_DIO9,
  DL_GPIO_IIDX_DIO10 = GPIO_CPU_INT_IIDX_STAT_DIO10,
  DL_GPIO_IIDX_DIO11 = GPIO_CPU_INT_IIDX_STAT_DIO11,
  DL_GPIO_IIDX_DIO12 = GPIO_CPU_INT_IIDX_STAT_DIO12,
  DL_GPIO_IIDX_DIO13 = GPIO_CPU_INT_IIDX_STAT_DIO13,
  DL_GPIO_IIDX_DIO14 = GPIO_CPU_INT_IIDX_STAT_DIO14,
  DL_GPIO_IIDX_DIO15 = GPIO_CPU_INT_IIDX_STAT_DIO15,
  DL_GPIO_IIDX_DIO16 = GPIO_CPU_INT_IIDX_STAT_DIO16,
  DL_GPIO_IIDX_DIO17 = GPIO_CPU_INT_IIDX_STAT_DIO17,
  DL_GPIO_IIDX_DIO18 = GPIO_CPU_INT_IIDX_STAT_DIO18,
  DL_GPIO_IIDX_DIO19 = GPIO_CPU_INT_IIDX_STAT_DIO19,
  DL_GPIO_IIDX_DIO20 = GPIO_CPU_INT_IIDX_STAT_DIO20,
  DL_GPIO_IIDX_DIO21 = GPIO_CPU_INT_IIDX_STAT_DIO21,
  DL_GPIO_IIDX_DIO22 = GPIO_CPU_INT_IIDX_STAT_DIO22,
  DL_GPIO_IIDX_DIO23 = GPIO_CPU_INT_IIDX_STAT_DIO23,
  DL_GPIO_IIDX_DIO24 = GPIO_CPU_INT_IIDX_STAT_DIO24,
  DL_GPIO_IIDX_DIO25 = GPIO_CPU_INT_IIDX_STAT_DIO25,
  DL_GPIO_IIDX_DIO26 = GPIO_CPU_INT_IIDX_STAT_DIO26,
  DL_GPIO_IIDX_DIO27 = GPIO_CPU_INT_IIDX_STAT_DIO27,
  DL_GPIO_IIDX_DIO28 = GPIO_CPU_INT_IIDX_STAT_DIO28,
  DL_GPIO_IIDX_DIO29 = GPIO_CPU_INT_IIDX_STAT_DIO29,
  DL_GPIO_IIDX_DIO30 = GPIO_CPU_INT_IIDX_STAT_DIO30,
  DL_GPIO_IIDX_DIO31 = GPIO_CPU_INT_IIDX_STAT_DIO31
}
 

Functions

__STATIC_INLINE void DL_GPIO_enablePower (GPIO_Regs *gpio)
 Enables power on GPIO module. More...
 
__STATIC_INLINE void DL_GPIO_disablePower (GPIO_Regs *gpio)
 Disables power on gpio module. More...
 
__STATIC_INLINE bool DL_GPIO_isPowerEnabled (GPIO_Regs *gpio)
 Returns if power on gpio module. More...
 
__STATIC_INLINE void DL_GPIO_reset (GPIO_Regs *gpio)
 Resets gpio peripheral. More...
 
__STATIC_INLINE bool DL_GPIO_isReset (GPIO_Regs *gpio)
 Returns if gpio peripheral was reset. More...
 
__STATIC_INLINE void DL_GPIO_initDigitalOutput (uint32_t pincmIndex)
 Configures a pin as a basic GPIO output. More...
 
__STATIC_INLINE void DL_GPIO_initDigitalOutputFeatures (uint32_t pincmIndex, DL_GPIO_INVERSION inversion, DL_GPIO_RESISTOR internalResistor, DL_GPIO_DRIVE_STRENGTH driveStrength, DL_GPIO_HIZ hiZ)
 Configures a pin as a GPIO output. More...
 
__STATIC_INLINE void DL_GPIO_setDigitalInternalResistor (uint32_t pincmIndex, DL_GPIO_RESISTOR internalResistor)
 Configures internal resistor for digital pin. More...
 
__STATIC_INLINE void DL_GPIO_setAnalogInternalResistor (uint32_t pincmIndex, DL_GPIO_RESISTOR internalResistor)
 Configures internal resistor for analog pin. More...
 
__STATIC_INLINE void DL_GPIO_initDigitalInput (uint32_t pincmIndex)
 Configures a pin as a basic GPIO input. More...
 
__STATIC_INLINE void DL_GPIO_initDigitalInputFeatures (uint32_t pincmIndex, DL_GPIO_INVERSION inversion, DL_GPIO_RESISTOR internalResistor, DL_GPIO_HYSTERESIS hysteresis, DL_GPIO_WAKEUP wakeup)
 Configures a pin as a GPIO input. More...
 
__STATIC_INLINE void DL_GPIO_initPeripheralFunction (uint32_t pincmIndex, uint32_t function)
 Configure a pin to operate with peripheral functionality. More...
 
__STATIC_INLINE void DL_GPIO_initPeripheralOutputFunction (uint32_t pincmIndex, uint32_t function)
 Configure a pin to operate with peripheral output functionality. More...
 
__STATIC_INLINE void DL_GPIO_initPeripheralOutputFunctionFeatures (uint32_t pincmIndex, uint32_t function, DL_GPIO_INVERSION inversion, DL_GPIO_RESISTOR internalResistor, DL_GPIO_DRIVE_STRENGTH driveStrength, DL_GPIO_HIZ hiZ)
 Configure a pin to operate with peripheral output functionality with optional features. More...
 
__STATIC_INLINE void DL_GPIO_initPeripheralInputFunction (uint32_t pincmIndex, uint32_t function)
 Configure a pin to operate with peripheral input functionality. More...
 
__STATIC_INLINE void DL_GPIO_initPeripheralInputFunctionFeatures (uint32_t pincmIndex, uint32_t function, DL_GPIO_INVERSION inversion, DL_GPIO_RESISTOR internalResistor, DL_GPIO_HYSTERESIS hysteresis, DL_GPIO_WAKEUP wakeup)
 Configure a pin to operate with peripheral input functionality with optional features. More...
 
__STATIC_INLINE void DL_GPIO_initPeripheralAnalogFunction (uint32_t pincmIndex)
 Configure a pin to operate with analog functionality. More...
 
__STATIC_INLINE void DL_GPIO_enableWakeUp (uint32_t pincmIndex)
 Set GPIO pin's wakeup enable bit. More...
 
__STATIC_INLINE void DL_GPIO_disableWakeUp (uint32_t pincmIndex)
 Clear GPIO pin's wakeup enable bit. More...
 
__STATIC_INLINE bool DL_GPIO_isWakeUpEnabled (uint32_t pincmIndex)
 Returns if GPIO pin's wake up bit is enabled. More...
 
__STATIC_INLINE bool DL_GPIO_isWakeStateGenerated (uint32_t pincmIndex)
 Checks if the GPIO pin's Wake State bit is active. More...
 
__STATIC_INLINE uint32_t DL_GPIO_readPins (GPIO_Regs *gpio, uint32_t pins)
 Read a group of GPIO pins. More...
 
__STATIC_INLINE void DL_GPIO_writePins (GPIO_Regs *gpio, uint32_t pins)
 Write a group of GPIO pins. More...
 
__STATIC_INLINE void DL_GPIO_writePinsVal (GPIO_Regs *gpio, uint32_t pinsMask, uint32_t pinsVal)
 Update the value of one or more GPIO pins. More...
 
__STATIC_INLINE void DL_GPIO_setPins (GPIO_Regs *gpio, uint32_t pins)
 Set a group of GPIO pins. More...
 
__STATIC_INLINE void DL_GPIO_clearPins (GPIO_Regs *gpio, uint32_t pins)
 Clear a group of GPIO pins. More...
 
__STATIC_INLINE void DL_GPIO_togglePins (GPIO_Regs *gpio, uint32_t pins)
 Toggle a group of GPIO pins. More...
 
__STATIC_INLINE void DL_GPIO_enableOutput (GPIO_Regs *gpio, uint32_t pins)
 Enable output on a group of GPIO pins. More...
 
__STATIC_INLINE void DL_GPIO_disableOutput (GPIO_Regs *gpio, uint32_t pins)
 Disable output on a group of GPIO pins. More...
 
__STATIC_INLINE void DL_GPIO_enableDMAAccess (GPIO_Regs *gpio, uint32_t pins)
 Enable DMA access on a group of pins. More...
 
__STATIC_INLINE void DL_GPIO_disableDMAAccess (GPIO_Regs *gpio, uint32_t pins)
 Disable DMA access on a group of pins. More...
 
__STATIC_INLINE uint32_t DL_GPIO_isDMAccessEnabled (GPIO_Regs *gpio, uint32_t pins)
 Check if DMA access is enabled on a group of pins. More...
 
__STATIC_INLINE void DL_GPIO_setLowerPinsPolarity (GPIO_Regs *gpio, uint32_t polarity)
 Set the polarity of all bits [0, 15] in the group of pins. More...
 
__STATIC_INLINE void DL_GPIO_setUpperPinsPolarity (GPIO_Regs *gpio, uint32_t polarity)
 Set the polarity of all bits [16, 31] in the group of pins. More...
 
__STATIC_INLINE uint32_t DL_GPIO_getLowerPinsPolarity (GPIO_Regs *gpio)
 Get the polarity of bits [0, 15] in the group of pins. More...
 
__STATIC_INLINE uint32_t DL_GPIO_getUpperPinsPolarity (GPIO_Regs *gpio)
 Get the polarity of bits [16, 31] in the group of pins. More...
 
__STATIC_INLINE void DL_GPIO_setLowerPinsInputFilter (GPIO_Regs *gpio, uint32_t filter)
 Set the input filter of bits [0, 15] in the group of pins. More...
 
__STATIC_INLINE void DL_GPIO_setUpperPinsInputFilter (GPIO_Regs *gpio, uint32_t filter)
 Set the input filter of bits [16, 31] in the group of pins. More...
 
__STATIC_INLINE uint32_t DL_GPIO_getLowerPinsInputFilter (GPIO_Regs *gpio)
 Get the input filter of bits [0, 15] in the group of pins. More...
 
__STATIC_INLINE uint32_t DL_GPIO_getUpperPinsInputFilter (GPIO_Regs *gpio)
 Get the input filter of bits [16, 31] in the group of pins. More...
 
__STATIC_INLINE void DL_GPIO_enableGlobalFastWake (GPIO_Regs *gpio)
 Enable Global Fast Wake. More...
 
__STATIC_INLINE void DL_GPIO_disableGlobalFastWake (GPIO_Regs *gpio)
 Disable Global Fast Wake. More...
 
__STATIC_INLINE void DL_GPIO_enableFastWakePins (GPIO_Regs *gpio, uint32_t pins)
 Enable fast wake for pins. More...
 
__STATIC_INLINE void DL_GPIO_disableFastWakePins (GPIO_Regs *gpio, uint32_t pins)
 Disable fast wake for pins. More...
 
__STATIC_INLINE void DL_GPIO_enableHiZ (uint32_t pincmIndex)
 Enable Hi-Z for the pin. More...
 
__STATIC_INLINE void DL_GPIO_disableHiZ (uint32_t pincmIndex)
 Disable Hi-Z for the pin. More...
 
__STATIC_INLINE uint32_t DL_GPIO_getEnabledFastWakePins (GPIO_Regs *gpio, uint32_t pins)
 Check which pins have fast wake feature enabled. More...
 
__STATIC_INLINE void DL_GPIO_enableInterrupt (GPIO_Regs *gpio, uint32_t pins)
 Enable GPIO interrupts. More...
 
__STATIC_INLINE void DL_GPIO_disableInterrupt (GPIO_Regs *gpio, uint32_t pins)
 Disable GPIO interrupts. More...
 
__STATIC_INLINE uint32_t DL_GPIO_getEnabledInterrupts (GPIO_Regs *gpio, uint32_t pins)
 Check which GPIO interrupts are enabled. More...
 
__STATIC_INLINE uint32_t DL_GPIO_getEnabledInterruptStatus (GPIO_Regs *gpio, uint32_t pins)
 Check interrupt flag of enabled GPIO interrupts. More...
 
__STATIC_INLINE void DL_GPIO_setInterrupt (GPIO_Regs *gpio, uint32_t pins)
 Set interrupt flag of any GPIO. More...
 
__STATIC_INLINE uint32_t DL_GPIO_getRawInterruptStatus (GPIO_Regs *gpio, uint32_t pins)
 Check interrupt flag of any GPIO interrupt. More...
 
__STATIC_INLINE DL_GPIO_IIDX DL_GPIO_getPendingInterrupt (GPIO_Regs *gpio)
 Get highest priority pending GPIO interrupt. More...
 
__STATIC_INLINE void DL_GPIO_clearInterruptStatus (GPIO_Regs *gpio, uint32_t pins)
 Clear pending GPIO interrupts. More...
 
__STATIC_INLINE void DL_GPIO_configSubscriber (GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index, DL_GPIO_SUBSCRIBER_OUT_POLICY policy, DL_GPIO_SUBSCRIBERx_PIN pinIndex)
 Configures GPIO subscriber. This API preserves enable/disbale status of subscriber. More...
 
__STATIC_INLINE void DL_GPIO_enableSubscriber (GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index)
 Enables GPIO subscriber. More...
 
__STATIC_INLINE void DL_GPIO_disableSubscriber (GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index)
 Disables GPIO subscriber. More...
 
__STATIC_INLINE bool DL_GPIO_isSubscriberEnabled (GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index)
 Returns if GPIO subscriber is enabled. More...
 
__STATIC_INLINE void DL_GPIO_setPublisherChanID (GPIO_Regs *gpio, DL_GPIO_PUBLISHER_INDEX index, uint8_t chanID)
 Sets the event publisher channel id. More...
 
__STATIC_INLINE uint8_t DL_GPIO_getPublisherChanID (GPIO_Regs *gpio, DL_GPIO_PUBLISHER_INDEX index)
 Gets the event publisher channel id. More...
 
__STATIC_INLINE void DL_GPIO_setSubscriberChanID (GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index, uint8_t chanID)
 Sets the event subscriber channel id. More...
 
__STATIC_INLINE uint8_t DL_GPIO_getSubscriberChanID (GPIO_Regs *gpio, DL_GPIO_SUBSCRIBER_INDEX index)
 Gets the event subscriber channel id. More...
 
__STATIC_INLINE void DL_GPIO_enableEvents (GPIO_Regs *gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
 Enables GPIO events. More...
 
__STATIC_INLINE void DL_GPIO_disableEvents (GPIO_Regs *gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
 Disable GPIO events. More...
 
__STATIC_INLINE uint32_t DL_GPIO_getEnabledEvents (GPIO_Regs *gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
 Check which GPIO events are enabled. More...
 
__STATIC_INLINE uint32_t DL_GPIO_getEnabledEventStatus (GPIO_Regs *gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
 Checks if any of the GPIO events which were previously enabled are pending. More...
 
__STATIC_INLINE void DL_GPIO_clearEventStatus (GPIO_Regs *gpio, DL_GPIO_EVENT_ROUTE index, uint32_t pins)
 Clear pending GPIO event. More...
 

Detailed Description

Overview

The GPIO Driver Library allows full configuration of the MSPM0 GPIO module. The GPIO peripheral provides the user with a means to write data out and read data in to and from the device pins. It also provides a way to detect wakeup events while the device is in a low power state.


Enumeration Type Documentation

§ DL_GPIO_INVERSION

Enumerator
DL_GPIO_INVERSION_ENABLE 

Enable Inversion

DL_GPIO_INVERSION_DISABLE 

Disable Inversion

§ DL_GPIO_DRIVE_STRENGTH

Enumerator
DL_GPIO_DRIVE_STRENGTH_LOW 

Disable High-Drive Strength

DL_GPIO_DRIVE_STRENGTH_HIGH 

Enable High-Drive (where allowed)

§ DL_GPIO_RESISTOR

Enumerator
DL_GPIO_RESISTOR_NONE 

Use no pull up/pull down resistors on pin

DL_GPIO_RESISTOR_PULL_UP 

Use a pull up resistor on the pin

DL_GPIO_RESISTOR_PULL_DOWN 

Use a pull down resistor on the pin

§ DL_GPIO_HYSTERESIS

Enumerator
DL_GPIO_HYSTERESIS_ENABLE 

Enable Hysteresis on pin

DL_GPIO_HYSTERESIS_DISABLE 

Disable Hysteresis on pin

§ DL_GPIO_WAKEUP

Enumerator
DL_GPIO_WAKEUP_ENABLE 

Wakeup enabled

DL_GPIO_WAKEUP_DISABLE 

Wakeup disabled

DL_GPIO_WAKEUP_ON_0 

Wakeup when pin changes to 0

DL_GPIO_WAKEUP_ON_1 

Wakeup when pin changes to 1

§ DL_GPIO_HIZ

Enumerator
DL_GPIO_HIZ_ENABLE 

Enable Hi-Z on pin

DL_GPIO_HIZ_DISABLE 

Disable Hi-Z on pin

§ DL_GPIO_EVENT_ROUTE

Enumerator
DL_GPIO_EVENT_ROUTE_1 

GPIO event route 1

DL_GPIO_EVENT_ROUTE_2 

GPIO event route 2

§ DL_GPIO_PUBLISHER_INDEX

Enumerator
DL_GPIO_PUBLISHER_INDEX_0 

GPIO Publisher index 0

DL_GPIO_PUBLISHER_INDEX_1 

GPIO Publisher index 1

§ DL_GPIO_SUBSCRIBER_INDEX

Enumerator
DL_GPIO_SUBSCRIBER_INDEX_0 

GPIO Subscriber index 0

DL_GPIO_SUBSCRIBER_INDEX_1 

GPIO Subscriber index 1

§ DL_GPIO_SUBSCRIBER_OUT_POLICY

Enumerator
DL_GPIO_SUBSCRIBER_OUT_POLICY_SET 

GPIO is set

DL_GPIO_SUBSCRIBER_OUT_POLICY_CLEAR 

GPIO is cleared

DL_GPIO_SUBSCRIBER_OUT_POLICY_TOGGLE 

GPIO is toggled

§ DL_GPIO_SUBSCRIBERx_PIN

Enumerator
DL_GPIO_SUBSCRIBER0_PIN_0 

Selects DIO 0 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_1 

Selects DIO 1 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_2 

Selects DIO 2 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_3 

Selects DIO 3 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_4 

Selects DIO 4 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_5 

Selects DIO 5 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_6 

Selects DIO 6 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_7 

Selects DIO 7 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_8 

Selects DIO 8 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_9 

Selects DIO 9 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_10 

Selects DIO 10 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_11 

Selects DIO 11 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_12 

Selects DIO 12 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_13 

Selects DIO 13 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_14 

Selects DIO 14 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER0_PIN_15 

Selects DIO 15 when Subscriber index 0 is selected

DL_GPIO_SUBSCRIBER1_PIN_16 

Selects DIO 16 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_17 

Selects DIO 17 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_18 

Selects DIO 18 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_19 

Selects DIO 19 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_20 

Selects DIO 20 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_21 

Selects DIO 21 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_22 

Selects DIO 22 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_23 

Selects DIO 23 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_24 

Selects DIO 24 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_25 

Selects DIO 25 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_26 

Selects DIO 26 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_27 

Selects DIO 27 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_28 

Selects DIO 28 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_29 

Selects DIO 29 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_30 

Selects DIO 30 when Subscriber index 1 is selected

DL_GPIO_SUBSCRIBER1_PIN_31 

Selects DIO 31 when Subscriber index 1 is selected

§ DL_GPIO_IIDX

Enumerator
DL_GPIO_IIDX_DIO0 

Interrupt index for GPIO DIO0

DL_GPIO_IIDX_DIO1 

Interrupt index for GPIO DIO1

DL_GPIO_IIDX_DIO2 

Interrupt index for GPIO DIO2

DL_GPIO_IIDX_DIO3 

Interrupt index for GPIO DIO3

DL_GPIO_IIDX_DIO4 

Interrupt index for GPIO DIO4

DL_GPIO_IIDX_DIO5 

Interrupt index for GPIO DIO5

DL_GPIO_IIDX_DIO6 

Interrupt index for GPIO DIO6

DL_GPIO_IIDX_DIO7 

Interrupt index for GPIO DIO7

DL_GPIO_IIDX_DIO8 

Interrupt index for GPIO DIO8

DL_GPIO_IIDX_DIO9 

Interrupt index for GPIO DIO9

DL_GPIO_IIDX_DIO10 

Interrupt index for GPIO DIO10

DL_GPIO_IIDX_DIO11 

Interrupt index for GPIO DIO11

DL_GPIO_IIDX_DIO12 

Interrupt index for GPIO DIO12

DL_GPIO_IIDX_DIO13 

Interrupt index for GPIO DIO13

DL_GPIO_IIDX_DIO14 

Interrupt index for GPIO DIO14

DL_GPIO_IIDX_DIO15 

Interrupt index for GPIO DIO15

DL_GPIO_IIDX_DIO16 

Interrupt index for GPIO DIO16

DL_GPIO_IIDX_DIO17 

Interrupt index for GPIO DIO17

DL_GPIO_IIDX_DIO18 

Interrupt index for GPIO DIO18

DL_GPIO_IIDX_DIO19 

Interrupt index for GPIO DIO19

DL_GPIO_IIDX_DIO20 

Interrupt index for GPIO DIO20

DL_GPIO_IIDX_DIO21 

Interrupt index for GPIO DIO21

DL_GPIO_IIDX_DIO22 

Interrupt index for GPIO DIO22

DL_GPIO_IIDX_DIO23 

Interrupt index for GPIO DIO23

DL_GPIO_IIDX_DIO24 

Interrupt index for GPIO DIO24

DL_GPIO_IIDX_DIO25 

Interrupt index for GPIO DIO25

DL_GPIO_IIDX_DIO26 

Interrupt index for GPIO DIO26

DL_GPIO_IIDX_DIO27 

Interrupt index for GPIO DIO27

DL_GPIO_IIDX_DIO28 

Interrupt index for GPIO DIO28

DL_GPIO_IIDX_DIO29 

Interrupt index for GPIO DIO29

DL_GPIO_IIDX_DIO30 

Interrupt index for GPIO DIO30

DL_GPIO_IIDX_DIO31 

Interrupt index for GPIO DIO31

Function Documentation

§ DL_GPIO_enablePower()

__STATIC_INLINE void DL_GPIO_enablePower ( GPIO_Regs *  gpio)

Enables power on GPIO module.

Parameters
gpioPointer to the register overlay for the peripheral

§ DL_GPIO_disablePower()

__STATIC_INLINE void DL_GPIO_disablePower ( GPIO_Regs *  gpio)

Disables power on gpio module.

Parameters
gpioPointer to the register overlay for the peripheral

§ DL_GPIO_isPowerEnabled()

__STATIC_INLINE bool DL_GPIO_isPowerEnabled ( GPIO_Regs *  gpio)

Returns if power on gpio module.

Parameters
gpioPointer to the register overlay for the peripheral
Returns
true if power is enabled
false if power is disabled

§ DL_GPIO_reset()

__STATIC_INLINE void DL_GPIO_reset ( GPIO_Regs *  gpio)

Resets gpio peripheral.

Parameters
gpioPointer to the register overlay for the peripheral

§ DL_GPIO_isReset()

__STATIC_INLINE bool DL_GPIO_isReset ( GPIO_Regs *  gpio)

Returns if gpio peripheral was reset.

Parameters
gpioPointer to the register overlay for the peripheral
Returns
true if peripheral was reset
false if peripheral wasn't reset

§ DL_GPIO_initDigitalOutput()

__STATIC_INLINE void DL_GPIO_initDigitalOutput ( uint32_t  pincmIndex)

Configures a pin as a basic GPIO output.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin.

§ DL_GPIO_initDigitalOutputFeatures()

__STATIC_INLINE void DL_GPIO_initDigitalOutputFeatures ( uint32_t  pincmIndex,
DL_GPIO_INVERSION  inversion,
DL_GPIO_RESISTOR  internalResistor,
DL_GPIO_DRIVE_STRENGTH  driveStrength,
DL_GPIO_HIZ  hiZ 
)

Configures a pin as a GPIO output.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin.
[in]inversionEnable Inversion of the pin output. One of DL_GPIO_INVERSION.
[in]internalResistorInternal resistor to use. One of DL_GPIO_RESISTOR.
[in]driveStrengthEnable High-Drive for the pin. One of DL_GPIO_DRIVE_STRENGTH.
[in]hiZEnable/disable Hi-Z for the pin. One of DL_GPIO_HIZ.

§ DL_GPIO_setDigitalInternalResistor()

__STATIC_INLINE void DL_GPIO_setDigitalInternalResistor ( uint32_t  pincmIndex,
DL_GPIO_RESISTOR  internalResistor 
)

Configures internal resistor for digital pin.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin.
[in]internalResistorInternal resistor to use. One of DL_GPIO_RESISTOR.

§ DL_GPIO_setAnalogInternalResistor()

__STATIC_INLINE void DL_GPIO_setAnalogInternalResistor ( uint32_t  pincmIndex,
DL_GPIO_RESISTOR  internalResistor 
)

Configures internal resistor for analog pin.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin.
[in]internalResistorInternal resistor to use. One of DL_GPIO_RESISTOR.

§ DL_GPIO_initDigitalInput()

__STATIC_INLINE void DL_GPIO_initDigitalInput ( uint32_t  pincmIndex)

Configures a pin as a basic GPIO input.

Configures the pin as a basic GPIO input. If you want to use additional features of the input mode, refer to DL_GPIO_initDigitalInputFeatures.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin.

§ DL_GPIO_initDigitalInputFeatures()

__STATIC_INLINE void DL_GPIO_initDigitalInputFeatures ( uint32_t  pincmIndex,
DL_GPIO_INVERSION  inversion,
DL_GPIO_RESISTOR  internalResistor,
DL_GPIO_HYSTERESIS  hysteresis,
DL_GPIO_WAKEUP  wakeup 
)

Configures a pin as a GPIO input.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin.
[in]inversionEnable Inversion of the pin input. One of DL_GPIO_INVERSION.
[in]internalResistorInternal resistor to use. One of DL_GPIO_RESISTOR.
[in]hysteresisEnable/disable Hysteresis on the pin. One of DL_GPIO_HYSTERESIS.
[in]wakeupConfigure wakeup behavior for the pin. One of DL_GPIO_WAKEUP.

§ DL_GPIO_initPeripheralFunction()

__STATIC_INLINE void DL_GPIO_initPeripheralFunction ( uint32_t  pincmIndex,
uint32_t  function 
)

Configure a pin to operate with peripheral functionality.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target pin to configure the peripheral functionality for
[in]functionFunction to configure the pin for. See definition of IOMUX_PINCMx_PF_xxx in the device header file.

§ DL_GPIO_initPeripheralOutputFunction()

__STATIC_INLINE void DL_GPIO_initPeripheralOutputFunction ( uint32_t  pincmIndex,
uint32_t  function 
)

Configure a pin to operate with peripheral output functionality.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target pin to configure the peripheral functionality for
[in]functionFunction to configure the pin for. See definition of IOMUX_PINCMx_PF_xxx in the device header file.

§ DL_GPIO_initPeripheralOutputFunctionFeatures()

__STATIC_INLINE void DL_GPIO_initPeripheralOutputFunctionFeatures ( uint32_t  pincmIndex,
uint32_t  function,
DL_GPIO_INVERSION  inversion,
DL_GPIO_RESISTOR  internalResistor,
DL_GPIO_DRIVE_STRENGTH  driveStrength,
DL_GPIO_HIZ  hiZ 
)

Configure a pin to operate with peripheral output functionality with optional features.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target pin to configure the peripheral functionality for
[in]functionFunction to configure the pin for. Check definition of IOMUX_PINCMx_PF_xxx in the device header file.
[in]inversionEnable Inversion of the pin output. One of DL_GPIO_INVERSION.
[in]internalResistorInternal resistor to use. One of DL_GPIO_RESISTOR.
[in]driveStrengthEnable High-Drive for the pin. One of DL_GPIO_DRIVE_STRENGTH.
[in]hiZEnable/disable Hi-Z for the pin. One of DL_GPIO_HIZ.

§ DL_GPIO_initPeripheralInputFunction()

__STATIC_INLINE void DL_GPIO_initPeripheralInputFunction ( uint32_t  pincmIndex,
uint32_t  function 
)

Configure a pin to operate with peripheral input functionality.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target pin to configure the peripheral functionality for
[in]functionFunction to configure the pin for. See definition of IOMUX_PINCMx_PF_xxx in the device header file.

§ DL_GPIO_initPeripheralInputFunctionFeatures()

__STATIC_INLINE void DL_GPIO_initPeripheralInputFunctionFeatures ( uint32_t  pincmIndex,
uint32_t  function,
DL_GPIO_INVERSION  inversion,
DL_GPIO_RESISTOR  internalResistor,
DL_GPIO_HYSTERESIS  hysteresis,
DL_GPIO_WAKEUP  wakeup 
)

Configure a pin to operate with peripheral input functionality with optional features.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target pin to configure the peripheral functionality for
[in]functionFunction to configure the pin for. See definition of IOMUX_PINCMx_PF_xxx in the device header file.
[in]inversionEnable Inversion of the pin input. One of DL_GPIO_INVERSION.
[in]internalResistorInternal resistor to use. One of DL_GPIO_RESISTOR.
[in]hysteresisEnable/disable Hystersis on the pin. One of DL_GPIO_HYSTERESIS.
[in]wakeupConfigure wakeup behavior for the pin. One of DL_GPIO_WAKEUP.

§ DL_GPIO_initPeripheralAnalogFunction()

__STATIC_INLINE void DL_GPIO_initPeripheralAnalogFunction ( uint32_t  pincmIndex)

Configure a pin to operate with analog functionality.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target pin to configure the analog functionality for

§ DL_GPIO_enableWakeUp()

__STATIC_INLINE void DL_GPIO_enableWakeUp ( uint32_t  pincmIndex)

Set GPIO pin's wakeup enable bit.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin.

References DL_GPIO_WAKEUP_ENABLE.

§ DL_GPIO_disableWakeUp()

__STATIC_INLINE void DL_GPIO_disableWakeUp ( uint32_t  pincmIndex)

Clear GPIO pin's wakeup enable bit.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin.

§ DL_GPIO_isWakeUpEnabled()

__STATIC_INLINE bool DL_GPIO_isWakeUpEnabled ( uint32_t  pincmIndex)

Returns if GPIO pin's wake up bit is enabled.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin.
Returns
True if wake up enabled on GPIO pin.

§ DL_GPIO_isWakeStateGenerated()

__STATIC_INLINE bool DL_GPIO_isWakeStateGenerated ( uint32_t  pincmIndex)

Checks if the GPIO pin's Wake State bit is active.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin.
Returns
True if 0x00002000U, False if 0x00000000U.

§ DL_GPIO_readPins()

__STATIC_INLINE uint32_t DL_GPIO_readPins ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Read a group of GPIO pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsPins to read. Bitwise OR of DL_GPIO_PIN.
Returns
The pins (from the selection) that are currently high
Return values
BitwiseOR of DL_GPIO_PIN of pins that are currently high from the input selection.

§ DL_GPIO_writePins()

__STATIC_INLINE void DL_GPIO_writePins ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Write a group of GPIO pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsPins to write. All enabled GPIO pins will be set to the equivalent bit value in pins.

§ DL_GPIO_writePinsVal()

__STATIC_INLINE void DL_GPIO_writePinsVal ( GPIO_Regs *  gpio,
uint32_t  pinsMask,
uint32_t  pinsVal 
)

Update the value of one or more GPIO pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsMaskThe GPIO pin(s) you want to update. Bitwise OR of DL_GPIO_PIN.
[in]pinsValValue(s) for the GPIO pin(s) you want to update. Only the values for pins specified in pinsMask will change.

§ DL_GPIO_setPins()

__STATIC_INLINE void DL_GPIO_setPins ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Set a group of GPIO pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsPins to set high. Bitwise OR of DL_GPIO_PIN.

§ DL_GPIO_clearPins()

__STATIC_INLINE void DL_GPIO_clearPins ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Clear a group of GPIO pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsPins to clear. Bitwise OR of DL_GPIO_PIN.

§ DL_GPIO_togglePins()

__STATIC_INLINE void DL_GPIO_togglePins ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Toggle a group of GPIO pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsPins to toggle. Bitwise OR of DL_GPIO_PIN.

§ DL_GPIO_enableOutput()

__STATIC_INLINE void DL_GPIO_enableOutput ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Enable output on a group of GPIO pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsPins to enable output. Bitwise OR of DL_GPIO_PIN.

§ DL_GPIO_disableOutput()

__STATIC_INLINE void DL_GPIO_disableOutput ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Disable output on a group of GPIO pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsPins to disable output. Bitwise OR of DL_GPIO_PIN.

§ DL_GPIO_enableDMAAccess()

__STATIC_INLINE void DL_GPIO_enableDMAAccess ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Enable DMA access on a group of pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsPins to toggle. Bitwise OR of DL_GPIO_PIN.

References DL_Common_updateReg().

§ DL_GPIO_disableDMAAccess()

__STATIC_INLINE void DL_GPIO_disableDMAAccess ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Disable DMA access on a group of pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsPins to disable DMA access on. Bitwise OR of DL_GPIO_PIN.

References DL_Common_updateReg().

§ DL_GPIO_isDMAccessEnabled()

__STATIC_INLINE uint32_t DL_GPIO_isDMAccessEnabled ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Check if DMA access is enabled on a group of pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsPins to check DMA access on. Bitwise OR of DL_GPIO_PIN.
Returns
Which pins of the requested group have DMA access enabled
Return values
BitwiseOR of DL_GPIO_PIN values

§ DL_GPIO_setLowerPinsPolarity()

__STATIC_INLINE void DL_GPIO_setLowerPinsPolarity ( GPIO_Regs *  gpio,
uint32_t  polarity 
)

Set the polarity of all bits [0, 15] in the group of pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]polarityBitwise OR of DL_GPIO_EDGE_POLARITY for pins [0, 15]

§ DL_GPIO_setUpperPinsPolarity()

__STATIC_INLINE void DL_GPIO_setUpperPinsPolarity ( GPIO_Regs *  gpio,
uint32_t  polarity 
)

Set the polarity of all bits [16, 31] in the group of pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]polarityBitwise OR of DL_GPIO_EDGE_POLARITY for pins [16, 31]

§ DL_GPIO_getLowerPinsPolarity()

__STATIC_INLINE uint32_t DL_GPIO_getLowerPinsPolarity ( GPIO_Regs *  gpio)

Get the polarity of bits [0, 15] in the group of pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
Return values
Polaritysetting with bitwise OR of DL_GPIO_EDGE_POLARITY for pins [0, 15]

§ DL_GPIO_getUpperPinsPolarity()

__STATIC_INLINE uint32_t DL_GPIO_getUpperPinsPolarity ( GPIO_Regs *  gpio)

Get the polarity of bits [16, 31] in the group of pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
Return values
Polaritysetting with bitwise OR of DL_GPIO_EDGE_POLARITY for pins [16, 31]

§ DL_GPIO_setLowerPinsInputFilter()

__STATIC_INLINE void DL_GPIO_setLowerPinsInputFilter ( GPIO_Regs *  gpio,
uint32_t  filter 
)

Set the input filter of bits [0, 15] in the group of pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]filterBitwise OR of DL_GPIO_INPUT_FILTER for pins [0, 15]

§ DL_GPIO_setUpperPinsInputFilter()

__STATIC_INLINE void DL_GPIO_setUpperPinsInputFilter ( GPIO_Regs *  gpio,
uint32_t  filter 
)

Set the input filter of bits [16, 31] in the group of pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]filterBitwise OR of DL_GPIO_INPUT_FILTER for pins [16, 31]

§ DL_GPIO_getLowerPinsInputFilter()

__STATIC_INLINE uint32_t DL_GPIO_getLowerPinsInputFilter ( GPIO_Regs *  gpio)

Get the input filter of bits [0, 15] in the group of pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
Return values
Inputfilter setting with bitwise OR of DL_GPIO_INPUT_FILTER for pins [0, 15]

§ DL_GPIO_getUpperPinsInputFilter()

__STATIC_INLINE uint32_t DL_GPIO_getUpperPinsInputFilter ( GPIO_Regs *  gpio)

Get the input filter of bits [16, 31] in the group of pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
Return values
Inputfilter setting with bitwise OR of DL_GPIO_INPUT_FILTER for pins [16, 31]

§ DL_GPIO_enableGlobalFastWake()

__STATIC_INLINE void DL_GPIO_enableGlobalFastWake ( GPIO_Regs *  gpio)

Enable Global Fast Wake.

Parameters
[in]gpioPointer to the register overlay for the peripheral

§ DL_GPIO_disableGlobalFastWake()

__STATIC_INLINE void DL_GPIO_disableGlobalFastWake ( GPIO_Regs *  gpio)

Disable Global Fast Wake.

Parameters
[in]gpioPointer to the register overlay for the peripheral

§ DL_GPIO_enableFastWakePins()

__STATIC_INLINE void DL_GPIO_enableFastWakePins ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Enable fast wake for pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsBit mask of pins to enable fast-wake feature. Bitwise OR of DL_GPIO_PIN.

§ DL_GPIO_disableFastWakePins()

__STATIC_INLINE void DL_GPIO_disableFastWakePins ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Disable fast wake for pins.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsBit mask of pins to disable fast-wake feature. Bitwise OR of DL_GPIO_PIN.

§ DL_GPIO_enableHiZ()

__STATIC_INLINE void DL_GPIO_enableHiZ ( uint32_t  pincmIndex)

Enable Hi-Z for the pin.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin

§ DL_GPIO_disableHiZ()

__STATIC_INLINE void DL_GPIO_disableHiZ ( uint32_t  pincmIndex)

Disable Hi-Z for the pin.

Parameters
[in]pincmIndexThe PINCM register index that maps to the target GPIO pin

§ DL_GPIO_getEnabledFastWakePins()

__STATIC_INLINE uint32_t DL_GPIO_getEnabledFastWakePins ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Check which pins have fast wake feature enabled.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsBit mask of pins to check. Bitwise OR of DL_GPIO_PIN.
Returns
Which of the requested GPIO pins have fast wake enabled
Return values
BitwiseOR of DL_GPIO_PIN values

§ DL_GPIO_enableInterrupt()

__STATIC_INLINE void DL_GPIO_enableInterrupt ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Enable GPIO interrupts.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsBit mask of interrupts to enable. Bitwise OR of DL_GPIO_PIN.

§ DL_GPIO_disableInterrupt()

__STATIC_INLINE void DL_GPIO_disableInterrupt ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Disable GPIO interrupts.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsBit mask of interrupts to disable. Bitwise OR of DL_GPIO_PIN.

§ DL_GPIO_getEnabledInterrupts()

__STATIC_INLINE uint32_t DL_GPIO_getEnabledInterrupts ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Check which GPIO interrupts are enabled.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsBit mask of interrupts to check. Bitwise OR of DL_GPIO_PIN.
Returns
Which of the requested GPIO interrupts are enabled
Return values
BitwiseOR of DL_GPIO_PIN values

§ DL_GPIO_getEnabledInterruptStatus()

__STATIC_INLINE uint32_t DL_GPIO_getEnabledInterruptStatus ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Check interrupt flag of enabled GPIO interrupts.

Checks if any of the GPIO interrupts that were previously enabled are pending.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsBit mask of interrupts to check. Bitwise OR of DL_GPIO_PIN.
Returns
Which of the requested GPIO interrupts are pending
Return values
BitwiseOR of DL_GPIO_PIN values
See also
DL_GPIO_enableInterrupt

§ DL_GPIO_setInterrupt()

__STATIC_INLINE void DL_GPIO_setInterrupt ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Set interrupt flag of any GPIO.

Manually set a GPIO interrupt to be pending

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsBit mask of interrupts to set. Bitwise OR of DL_GPIO_PIN.

§ DL_GPIO_getRawInterruptStatus()

__STATIC_INLINE uint32_t DL_GPIO_getRawInterruptStatus ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Check interrupt flag of any GPIO interrupt.

Checks if any of the GPIO interrupts are pending. Interrupts do not have to be previously enabled.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsBit mask of interrupts to check. Bitwise OR of DL_GPIO_PIN.
Returns
Which of the requested GPIO interrupts are pending
Return values
BitwiseOR of DL_GPIO_PIN values

§ DL_GPIO_getPendingInterrupt()

__STATIC_INLINE DL_GPIO_IIDX DL_GPIO_getPendingInterrupt ( GPIO_Regs *  gpio)

Get highest priority pending GPIO interrupt.

Checks if any of the GPIO interrupts are pending. Interrupts do not have to be previously enabled.

Parameters
[in]gpioPointer to the register overlay for the peripheral
Returns
The highest priority pending GPIO interrupt
Return values
Oneof DL_GPIO_IIDX

§ DL_GPIO_clearInterruptStatus()

__STATIC_INLINE void DL_GPIO_clearInterruptStatus ( GPIO_Regs *  gpio,
uint32_t  pins 
)

Clear pending GPIO interrupts.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]pinsBit mask of interrupts to check. Bitwise OR of DL_GPIO_PIN.

§ DL_GPIO_configSubscriber()

__STATIC_INLINE void DL_GPIO_configSubscriber ( GPIO_Regs *  gpio,
DL_GPIO_SUBSCRIBER_INDEX  index,
DL_GPIO_SUBSCRIBER_OUT_POLICY  policy,
DL_GPIO_SUBSCRIBERx_PIN  pinIndex 
)

Configures GPIO subscriber. This API preserves enable/disbale status of subscriber.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the subscriber event index to be configured
[in]policySpecifies the the GPIO behavior when the subscriber receives publisher event.
[in]pinIndexSpecifies the GPIO bit number which will be targeted by the subscriber action.

References DL_Common_updateReg().

§ DL_GPIO_enableSubscriber()

__STATIC_INLINE void DL_GPIO_enableSubscriber ( GPIO_Regs *  gpio,
DL_GPIO_SUBSCRIBER_INDEX  index 
)

Enables GPIO subscriber.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the subscriber event index to be configured

§ DL_GPIO_disableSubscriber()

__STATIC_INLINE void DL_GPIO_disableSubscriber ( GPIO_Regs *  gpio,
DL_GPIO_SUBSCRIBER_INDEX  index 
)

Disables GPIO subscriber.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the subscriber event index to be configured

§ DL_GPIO_isSubscriberEnabled()

__STATIC_INLINE bool DL_GPIO_isSubscriberEnabled ( GPIO_Regs *  gpio,
DL_GPIO_SUBSCRIBER_INDEX  index 
)

Returns if GPIO subscriber is enabled.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the subscriber event index to be configured
Returns
true if GPIO subscriber is enabled
false if GPIO subscriber is disabled

§ DL_GPIO_setPublisherChanID()

__STATIC_INLINE void DL_GPIO_setPublisherChanID ( GPIO_Regs *  gpio,
DL_GPIO_PUBLISHER_INDEX  index,
uint8_t  chanID 
)

Sets the event publisher channel id.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the register event index to be configured
[in]chanIDChannel ID number. Valid range 0-15. If ChanID == 0 subscriber is disconnected. Consult your device datasheet on the actual maximum number of channels.

§ DL_GPIO_getPublisherChanID()

__STATIC_INLINE uint8_t DL_GPIO_getPublisherChanID ( GPIO_Regs *  gpio,
DL_GPIO_PUBLISHER_INDEX  index 
)

Gets the event publisher channel id.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the register event index to be configured
Returns
Event publisher channel ID

§ DL_GPIO_setSubscriberChanID()

__STATIC_INLINE void DL_GPIO_setSubscriberChanID ( GPIO_Regs *  gpio,
DL_GPIO_SUBSCRIBER_INDEX  index,
uint8_t  chanID 
)

Sets the event subscriber channel id.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the register event index to be configured
[in]chanIDChannel ID number. Valid range 0-15. If ChanID == 0 subscriber is disconnected. Consult your device datasheet on the actual maximum number of channels.

§ DL_GPIO_getSubscriberChanID()

__STATIC_INLINE uint8_t DL_GPIO_getSubscriberChanID ( GPIO_Regs *  gpio,
DL_GPIO_SUBSCRIBER_INDEX  index 
)

Gets the event subscriber channel id.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the register event index to be configured
Returns
Event subscriber channel ID

§ DL_GPIO_enableEvents()

__STATIC_INLINE void DL_GPIO_enableEvents ( GPIO_Regs *  gpio,
DL_GPIO_EVENT_ROUTE  index,
uint32_t  pins 
)

Enables GPIO events.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the register event index to be configured
[in]pinsValid options will depend on index argument. When index == DL_GPIO_EVENT_ROUTE_1, valid pins values are bitwise OR of DL_GPIO_PIN (0-15). When index == DL_GPIO_EVENT_ROUTE_2, valid pins Bitwise OR of DL_GPIO_PIN (16-31).

References DL_GPIO_EVENT_ROUTE_1, and DL_GPIO_EVENT_ROUTE_2.

§ DL_GPIO_disableEvents()

__STATIC_INLINE void DL_GPIO_disableEvents ( GPIO_Regs *  gpio,
DL_GPIO_EVENT_ROUTE  index,
uint32_t  pins 
)

Disable GPIO events.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the register event index to be configured
[in]pinsValid options will depend on index argument. When index == DL_GPIO_EVENT_ROUTE_1, valid pins values are bitwise OR of DL_GPIO_PIN (0-15). When index == DL_GPIO_EVENT_ROUTE_2, valid pins Bitwise OR of DL_GPIO_PIN (16-31).

References DL_GPIO_EVENT_ROUTE_1, and DL_GPIO_EVENT_ROUTE_2.

§ DL_GPIO_getEnabledEvents()

__STATIC_INLINE uint32_t DL_GPIO_getEnabledEvents ( GPIO_Regs *  gpio,
DL_GPIO_EVENT_ROUTE  index,
uint32_t  pins 
)

Check which GPIO events are enabled.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the register event index to be configured
[in]pinsValid options will depend on index argument. When index == DL_GPIO_EVENT_ROUTE_1, valid pins values are bitwise OR of DL_GPIO_PIN (0-15). When index == DL_GPIO_EVENT_ROUTE_2, valid pins Bitwise OR of DL_GPIO_PIN (16-31).
Returns
Which of the requested GPIO events are enabled
Return values
BitwiseOR of DL_GPIO_PIN values

§ DL_GPIO_getEnabledEventStatus()

__STATIC_INLINE uint32_t DL_GPIO_getEnabledEventStatus ( GPIO_Regs *  gpio,
DL_GPIO_EVENT_ROUTE  index,
uint32_t  pins 
)

Checks if any of the GPIO events which were previously enabled are pending.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the register event index to be configured
[in]pinsValid options will depend on index argument. When index == DL_GPIO_EVENT_ROUTE_1, valid pins values are bitwise OR of DL_GPIO_PIN (0-15). When index == DL_GPIO_EVENT_ROUTE_2, valid pins Bitwise OR of DL_GPIO_PIN (16-31).
Returns
Which of the requested GPIO events are pending
Return values
BitwiseOR of DL_GPIO_PIN values
See also
DL_GPIO_enableEvents

§ DL_GPIO_clearEventStatus()

__STATIC_INLINE void DL_GPIO_clearEventStatus ( GPIO_Regs *  gpio,
DL_GPIO_EVENT_ROUTE  index,
uint32_t  pins 
)

Clear pending GPIO event.

Parameters
[in]gpioPointer to the register overlay for the peripheral
[in]indexSpecifies the register event index to be configured
[in]pinsValid options will depend on index argument. When index == DL_GPIO_EVENT_ROUTE_1, valid pins values are bitwise OR of DL_GPIO_PIN (0-15). When index == DL_GPIO_EVENT_ROUTE_2, valid pins Bitwise OR of DL_GPIO_PIN (16-31).

References DL_GPIO_EVENT_ROUTE_1, and DL_GPIO_EVENT_ROUTE_2.

© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale