These are useful utility functions for the general-purpose input & output module.
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. |
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. |
Extracts the GPIO port ID from the supplied GPIO Signal Index Number.
Extracts the GPIO signal (pin) offset from the supplied GPIO Signal Index Number.
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.