These are useful utility functions for the general-purpose input & output module.
◆ alt_gpio_bit_to_pid()
Extracts the GPIO port ID from the supplied GPIO Signal Index Number.
◆ alt_gpio_bit_to_port_pin()
Extracts the GPIO signal (pin) offset from the supplied GPIO Signal Index Number.
◆ alt_gpio_port_idcode_get()
Returns the ID code of the specified GPIO module.
- Parameters
-
gpio_pid | The GPIO port identifier. |
- Return values
-
uint32_t | The component code of the module, GPIO_MODULE_IDCODE. |
◆ alt_gpio_port_pin_to_bit()
Extracts the GPIO Signal Index Number from the supplied GPIO port ID and signal mask. If passed a bitmask composed of more than one signal, the signal number of the lowest bit in the bitmask presented is returned.
◆ alt_gpio_port_ver_get()
Returns the version code of the specified GPIO module.
- Parameters
-
gpio_pid | The GPIO port identifier. |
- Return values
-
uint32_t | The encoded revision number of the module. |