Modules#
General-Purpose Input-Output#
Includes.
Enumerations#
GPIO ports IDs.
GPIO Pin Modes.
GPIO Interrupt Configurations.
Functions#
Configure the GPIO pin interrupt.
Set the pin mode for a GPIO pin.
Get the GPIO pin status.
Set a single pin in GPIO configuration register to 1.
Set bits GPIO data out register to 1.
Set GPIO port configuration register.
Set slewrate for pins on a GPIO port.
Set a single pin in GPIO configuration register to 0.
Set bits in configuration register for a port to 0.
Read the pad value for a single pin in a GPIO port.
Get the current setting for a pin in a GPIO configuration register.
Read the pad values for GPIO port.
Get the current setting for a GPIO configuration register.
Toggle a single pin in GPIO port register.
Toggle pins in GPIO port register.
Enable one or more GPIO interrupts.
Disable one or more GPIO interrupts.
Clear one or more pending GPIO interrupts.
Set one or more pending GPIO interrupts from SW.
Get pending GPIO interrupts.
Get enabled GPIO interrupts.
Get enabled and pending GPIO interrupt flags.
Macros#
PAD configuration register base address.
UULP INTR base address.
ULP PAD configuration base address.
MCU HP base address.
MCU ULP base address.
SLEEP FSM base address.
MCU retention base address.
PAD configuration register for GPIO_n(n = 0 t0 63)
ULP PAD configuration register 0.
ULP PAD configuration register 1.
ULP PAD configuration register 2.
UULP V_bat PAD configuration base address.
PAD selection (0 to 21) A value of 1 on this gives control to M4SS.
PAD selection (22 to 33) A value of 1 on this gives control to M4SS.
MISC host base address.
ULP PAD register.
NPSS mask set register base address.
NPSS mask clear register base address.
NPSS clear register base address.
NPSS status register base address.
NPSS GPIO configuration register base address.
UULP GPIO status base address.
GPIO(25-30) pin configuration register.
Nibble shift for interrupt.
Byte shift for interrupt.
Word shift for interrupt.
GPIO LSB word mask.
GPIO LSB nibble mask.
GPIO maximum port pins.
GPIO Host PAD.
GPIO port A maximum pins.
GPIO port B maximum pins.
GPIO port C maximum pins.
GPIO port D maximum pins.
GPIO port E maximum pins.
GPIO port A mask.
GPIO port B mask.
GPIO port C mask.
GPIO port D mask.
GPIO instance clock.
Validate driver strength.
Validate GPIO parameters.
Validate driver disable state.
Validate GPIO HP pad selection.
Validate GPIO HP pin number.
Validate GPIO flags.
Validate ULP interrupts.
Validate ULP pins.
Validate UULP pins.
Validate UULP, ULP mode.
Validate UULP interrupt.
Validate GPIO port.
Validate GPIO mode.
Validate GPIO interrupt.
Validate ULP port and pin.
GPIO Group Interrupt 0.
GPIO Group Interrupt 1.
GPIO Pin Interrupt 0.
GPIO Pin Interrupt 1.
GPIO Pin Interrupt 2.
GPIO Pin Interrupt 3.
GPIO Pin Interrupt 4.
GPIO Pin Interrupt 5.
GPIO Pin Interrupt 6.
GPIO Pin Interrupt 7.
UULP Pin Interrupt 0.
ULP Pin Interrupt.
ULP Group Interrupt.
HP GPIO pin interrupt 0.
HP GPIO pin interrupt 1.
HP GPIO pin interrupt 2.
HP GPIO pin interrupt 3.
HP GPIO pin interrupt 4.
HP GPIO pin interrupt 5.
HP GPIO pin interrupt 6.
HP GPIO pin interrupt 7.
UULP GPIO pin interrupt 1.
UULP GPIO pin interrupt 2.
UULP GPIO pin interrupt 3.
UULP GPIO pin interrupt 4.
UULP GPIO pin interrupt 5.
ULP GPIO pin interrupt.
ULP GPIO group interrupt.
Maximum HP GPIO pin interrupts.
HP GPIO pin interrupt 0 number.
HP GPIO pin interrupt 1 number.
HP GPIO pin interrupt 2 number.
HP GPIO pin interrupt 3 number.
HP GPIO pin interrupt 4 number.
HP GPIO pin interrupt 5 number.
HP GPIO pin interrupt 6 number.
HP GPIO pin interrupt 7 number.
HP GPIO group interrupt 1 number.
HP GPIO group interrupt 2 number.
ULP GPIO pin interrupt number.
ULP GPIO group interrupt number.
UULP GPIO pin interrupt number.
GPIO group interrupt AND/OR.
GPIO group interrupt wakeup.
ULP GPIO port number.
GPIO mode 0.
GPIO mode 1.
GPIO mode 2.
GPIO mode 3.
GPIO mode 4.
GPIO mode 5.
GPIO mode 6.
GPIO mode 7.
GPIO mode 8.
GPIO mode 9.
GPIO mode 10.
GPIO mode 14.
Mode DISABLED for GPIO_P_MODEL.
Mode INPUT for GPIO_P_MODEL.
Mode INPUTPULL for GPIO_P_MODEL.
Mode INPUTPULLFILTER for GPIO_P_MODEL.
Mode PUSHPULL for GPIO_P_MODEL.
Mode PUSHPULLALT for GPIO_P_MODEL.
Mode WIREDOR for GPIO_P_MODEL.
Mode WIREDORPULLDOWN for GPIO_P_MODEL.
Mode WIREDAND for GPIO_P_MODEL.
Mode WIREDANDFILTER for GPIO_P_MODEL.
Mode WIREDANDPULLUP for GPIO_P_MODEL.
Mode WIREDANDPULLUPFILTER for GPIO_P_MODEL.
Mode WIREDANDALT for GPIO_P_MODEL.
Mode WIREDANDALTFILTER for GPIO_P_MODEL.
Mode WIREDANDALTPULLUP for GPIO_P_MODEL.
Mode WIREDANDALTPULLUPFILTER for GPIO_P_MODEL.
Shifted mode DISABLED for GPIO_P_MODEL.
Shifted mode INPUT for GPIO_P_MODEL.
Shifted mode INPUTPULL for GPIO_P_MODEL.
Shifted mode INPUTPULLFILTER for GPIO_P_MODEL.
Shifted mode PUSHPULL for GPIO_P_MODEL.
Shifted mode PUSHPULLALT for GPIO_P_MODEL.
Shifted mode WIREDOR for GPIO_P_MODEL.
Shifted mode WIREDORPULLDOWN for GPIO_P_MODEL.
Shifted mode WIREDAND for GPIO_P_MODEL.
Shifted mode WIREDANDFILTER for GPIO_P_MODEL.
Shifted mode WIREDANDPULLUP for GPIO_P_MODEL.
Shifted mode WIREDANDPULLUPFILTER for GPIO_P_MODEL.
Shifted mode WIREDANDALT for GPIO_P_MODEL.
Shifted mode WIREDANDALTFILTER for GPIO_P_MODEL.
Shifted mode WIREDANDALTPULLUP for GPIO_P_MODEL.
Shifted mode WIREDANDALTPULLUPFILTER for GPIO_P_MODEL.
GPIO PAD number 0.
GPIO PAD number 3.
GPIO PAD number 4.
GPIO PAD number 7.
GPIO PAD number 8.
GPIO Host PAD number 22.
GPIO Host PAD number 25.
GPIO Host PAD number 30.
GPIO Interrupt priority 14.
GPIO Interrupt priority 15.
GPIO ULP port number.
GPIO UULP pin mask.
GPIO bit 0 in configuration register.
GPIO bit 8 in configuration register.
GPIO bit 16 in configuration register.
GPIO bit 24 in configuration register.
GPIO port mask.
GPIO interrupt clear.
GPIO interrupt mask.
GPIO interrupt mask.
GPIO port A maximum pins.
GPIO port B maximum pins.
GPIO port C maximum pins.
GPIO port D maximum pins.
GPIO port A pin mask.
GPIO port B pin mask.
GPIO port C pin mask.
GPIO port D pin mask.
GPIO pins selection for selected port.
GPIO pins mask for selected port.
Validation of GPIO port.
Validating GPIO port and pin.
Highest GPIO pin number.
Highest GPIO port number.
Highest EXT GPIO interrupt number.
Enumeration Documentation#
sl_gpio_port_t#
sl_gpio_port_t
GPIO ports IDs.
Enumerator | |
---|---|
SL_GPIO_PORT_A | GPIO Port A. |
SL_GPIO_PORT_B | GPIO Port B. |
SL_GPIO_PORT_C | GPIO Port C. |
SL_GPIO_PORT_D | GPIO Port D. |
sl_gpio_mode_t#
sl_gpio_mode_t
GPIO Pin Modes.
Enumerator | |
---|---|
SL_GPIO_MODE_0 | Pin MUX GPIO Mode 0. |
SL_GPIO_MODE_1 | Pin MUX GPIO Mode 1. |
SL_GPIO_MODE_2 | Pin MUX GPIO Mode 2. |
SL_GPIO_MODE_3 | Pin MUX GPIO Mode 3. |
SL_GPIO_MODE_4 | Pin MUX GPIO Mode 4. |
SL_GPIO_MODE_5 | Pin MUX GPIO Mode 5. |
SL_GPIO_MODE_6 | Pin MUX GPIO Mode 6. |
SL_GPIO_MODE_7 | Pin MUX GPIO Mode 7. |
SL_GPIO_MODE_8 | Pin MUX GPIO Mode 8. |
SL_GPIO_MODE_9 | Pin MUX GPIO Mode 9. |
SL_GPIO_MODE_10 | Pin MUX GPIO Mode 10. |
SL_GPIO_MODE_14 | Pin MUX GPIO Mode 14. |
SL_GPIO_MODE_DISABLED | Input disabled. Pull-up if DOUT is set. |
SL_GPIO_MODE_INPUT | Input enabled. Filter if DOUT is set. |
SL_GPIO_MODE_INPUT_PULL | Input enabled. DOUT determines pull direction. |
SL_GPIO_MODE_INPUT_PULL_FILTER | Input enabled with filter. DOUT determines pull direction. |
SL_GPIO_MODE_PUSH_PULL | Push-pull output. |
SL_GPIO_MODE_PUSH_PULL_ALTERNATE | Push-pull using alternate control. |
SL_GPIO_MODE_WIRED_OR | Wired-or output. |
SL_GPIO_MODE_WIRED_OR_PULL_DOWN | Wired-or output with pull-down. |
SL_GPIO_MODE_WIRED_AND | Open-drain output. |
SL_GPIO_MODE_WIRED_AND_FILTER | Open-drain output with filter. |
SL_GPIO_MODE_WIRED_AND_PULLUP | Open-drain output with pull-up. |
SL_GPIO_MODE_WIRED_AND_PULLUP_FILTER | Open-drain output with filter and pull-up. |
SL_GPIO_MODE_WIRED_AND_ALTERNATE | Open-drain output using alternate control. |
SL_GPIO_MODE_WIRED_AND_ALTERNATE_FILTER | Open-drain output using alternate control with filter. |
SL_GPIO_MODE_WIRED_AND_ALTERNATE_PULLUP | Open-drain output using alternate control with pull-up. |
SL_GPIO_MODE_WIRED_AND_ALTERNATE_PULLUP_FILTER | Open-drain output using alternate control with filter and pull-up. |
sl_gpio_interrupt_flag_t#
sl_gpio_interrupt_flag_t
GPIO Interrupt Configurations.
Enumerator | |
---|---|
SL_GPIO_INTERRUPT_DISABLE | disable the interrupt |
SL_GPIO_INTERRUPT_ENABLE | enable the interrupt |
SL_GPIO_INTERRUPT_RISING_EDGE | interrupt when rising edge is detected |
SL_GPIO_INTERRUPT_FALLING_EDGE | interrupt when falling edge is detected |
Function Documentation#
sl_gpio_configure_interrupt#
void sl_gpio_configure_interrupt (sl_gpio_port_t port, uint8_t pin, uint32_t int_no, sl_gpio_interrupt_flag_t flags)
Configure the GPIO pin interrupt.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint8_t | [in] | pin | - The pin number on the port. HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. Port 3 has 9 pins. ULP instance has total 12 pins. |
uint32_t | [in] | int_no | - The interrupt number to trigger. |
sl_gpio_interrupt_flag_t | [in] | flags | - Interrupt configuration flags |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
None
sl_gpio_set_pin_mode#
void sl_gpio_set_pin_mode (sl_gpio_port_t port, uint8_t pin, sl_gpio_mode_t mode, uint32_t output_value)
Set the pin mode for a GPIO pin.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint8_t | [in] | pin | - The pin number on the port. HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. Port 3 has 9 pins. ULP instance has total 12 pins. |
sl_gpio_mode_t | [in] | mode | - The desired pin mode. |
uint32_t | [in] | output_value | - A value to set for the pin in the GPIO register. The GPIO setting is important for some input mode configurations. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance.
Returns
None
sl_gpio_get_pin_mode#
sl_gpio_mode_t sl_gpio_get_pin_mode (sl_gpio_port_t port, uint8_t pin)
Get the GPIO pin status.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint8_t | [in] | pin | - The pin number on the port. HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. Port 3 has 9 pins. ULP instance has total 12 pins. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode();
Returns
returns Pin status '0' - Output '1' - Input
sl_gpio_set_pin_output#
static __INLINE void sl_gpio_set_pin_output (sl_gpio_port_t port, uint8_t pin)
Set a single pin in GPIO configuration register to 1.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint8_t | [in] | pin | - The pin number on the port. HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. Port 3 has 9 pins. ULP instance has total 12 pins. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode(); sl_si91x_gpio_set_pin_direction();
Returns
None
sl_gpio_set_port_output#
static __INLINE void sl_gpio_set_port_output (sl_gpio_port_t port, uint32_t pins)
Set bits GPIO data out register to 1.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint32_t | [in] | pins | - The GPIO pins in a port are set to 1's. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode(); sl_si91x_gpio_set_pin_direction();
Returns
None
sl_gpio_set_port_output_value#
static __INLINE void sl_gpio_set_port_output_value (sl_gpio_port_t port, uint32_t val, uint32_t mask)
Set GPIO port configuration register.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint32_t | [in] | val | - Value to write to port configuration register. |
uint32_t | [in] | mask | - Mask indicating which bits to modify. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode(); sl_si91x_gpio_set_pin_direction();
Returns
None
sl_gpio_set_slew_rate#
static __INLINE void sl_gpio_set_slew_rate (sl_gpio_port_t port, uint32_t slewrate, uint32_t slewrate_alt)
Set slewrate for pins on a GPIO port.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The GPIO port to configure. |
uint32_t | [in] | slewrate | - The slewrate to configure for pins on this GPIO port. |
uint32_t | [in] | slewrate_alt | - The slewrate to configure for pins using alternate modes on this GPIO port. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance
Returns
None
sl_gpio_clear_pin_output#
static __INLINE void sl_gpio_clear_pin_output (sl_gpio_port_t port, uint8_t pin)
Set a single pin in GPIO configuration register to 0.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint8_t | [in] | pin | - The pin to set. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(); for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode(); sl_si91x_gpio_set_pin_direction();
Returns
None
sl_gpio_clear_port_output#
static __INLINE void sl_gpio_clear_port_output (sl_gpio_port_t port, uint32_t pins)
Set bits in configuration register for a port to 0.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint32_t | [in] | pins | - The GPIO pins in a port to clear. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
None
sl_gpio_get_pin_input#
static __INLINE uint8_t sl_gpio_get_pin_input (sl_gpio_port_t port, uint8_t pin)
Read the pad value for a single pin in a GPIO port.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint8_t | [in] | pin | - The pin number on the port. HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. Port 3 has 9 pins. ULP instance has total 12 pins. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
The GPIO pin value '0' - Output '1' - Input
sl_gpio_get_pin_output#
static __INLINE uint8_t sl_gpio_get_pin_output (sl_gpio_port_t port, uint8_t pin)
Get the current setting for a pin in a GPIO configuration register.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint8_t | [in] | pin | - The pin to get setting for. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
The GPIO pin value '0' - Output '1' - Input
sl_gpio_get_port_input#
static __INLINE uint32_t sl_gpio_get_port_input (sl_gpio_port_t port)
Read the pad values for GPIO port.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
The pad values for the GPIO port.
sl_gpio_get_port_output#
static __INLINE uint32_t sl_gpio_get_port_output (sl_gpio_port_t port)
Get the current setting for a GPIO configuration register.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
The port value for the requested port.
sl_gpio_toggle_pin_output#
static __INLINE void sl_gpio_toggle_pin_output (sl_gpio_port_t port, uint8_t pin)
Toggle a single pin in GPIO port register.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint8_t | [in] | pin | - The pin number on the port. HP instance has total 57 GPIO pins. Port 0, 1, 2 has 16 pins each. Port 3 has 9 pins. ULP instance has total 12 pins. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
None
sl_gpio_toggle_port_output#
static __INLINE void sl_gpio_toggle_port_output (sl_gpio_port_t port, uint32_t pins)
Toggle pins in GPIO port register.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_gpio_port_t | [in] | port | - The port to associate with the pin. HP instance - PORT 0,1,2,3 ULP instance - PORT 4 |
uint32_t | [in] | pins | - Port pins to toggle. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_si91x_gpio_enable_ulp_pad_receiver(), for ULP instance Use corresponding pad receiver API for corresponding GPIO instance. sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
None
sl_gpio_enable_interrupts#
static __INLINE void sl_gpio_enable_interrupts (uint32_t flags)
Enable one or more GPIO interrupts.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | [in] | flags | - GPIO interrupt sources to enable. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
None
sl_gpio_disable_interrupts#
static __INLINE void sl_gpio_disable_interrupts (uint32_t flags)
Disable one or more GPIO interrupts.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | [in] | flags | - GPIO interrupt sources to disable. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
None
sl_gpio_clear_interrupts#
static __INLINE void sl_gpio_clear_interrupts (uint32_t flags)
Clear one or more pending GPIO interrupts.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | [in] | flags | - Bitwise logic OR of GPIO interrupt sources to clear. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
None
sl_gpio_set_interrupts#
static __INLINE void sl_gpio_set_interrupts (uint32_t flags)
Set one or more pending GPIO interrupts from SW.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint32_t | [in] | flags | - GPIO interrupt sources to set to pending. |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
None
sl_gpio_get_pending_interrupts#
static __INLINE uint32_t sl_gpio_get_pending_interrupts (void )
Get pending GPIO interrupts.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
GPIO interrupt sources pending.
sl_gpio_get_enabled_interrupts#
static __INLINE uint32_t sl_gpio_get_enabled_interrupts (void )
Get enabled GPIO interrupts.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
Enabled GPIO interrupt sources.
sl_gpio_get_enabled_pending_interrupts#
static __INLINE uint32_t sl_gpio_get_enabled_pending_interrupts (void )
Get enabled and pending GPIO interrupt flags.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | [in] |
Useful for handling more interrupt sources in the same interrupt handler.
sl_si91x_gpio_enable_clock()sl_si91x_gpio_enable_pad_selection(), for HP instance sl_si91x_gpio_enable_pad_receiver(), for HP instance sl_gpio_set_pin_mode()sl_si91x_gpio_set_pin_direction()
Returns
None