greatscottgadgets / libgreat

a library to help you do Great things
BSD 3-Clause "New" or "Revised" License
31 stars 25 forks source link

Add support for configuring all gpio pin modes #35

Closed antoinevg closed 1 year ago

antoinevg commented 1 year ago

Adds a new function to firmware gpio drivers to make it possible to enable setting of pin modes for a given GPIO:

/**
 * Configures the system's pinmux to route the given GPIO pin to a physical pin
 * and apply the given pin configuration.
 */
int gpio_configure_pinmux_and_pin(gpio_pin_t pin, gpio_pin_configuration_t pin_configuration);

I did consider removing the - IMO now redundant -- gpio_configure_pinmux_and_resistors() infrastructure but there may be someone out there making use of it?