diff options
Diffstat (limited to 'include/gpio.h')
-rw-r--r-- | include/gpio.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/gpio.h b/include/gpio.h index 2c5006a8ec..5fc0b07d66 100644 --- a/include/gpio.h +++ b/include/gpio.h @@ -402,6 +402,28 @@ void gpio_reset(enum gpio_signal signal); #ifdef CONFIG_ZEPHYR /** + * @brief Save state of a GPIO controller port + * + * This function saves all pins current state from selected port. + * + * @param port Port to save + * @param flags Buffer to hold gpio flags + */ +int gpio_save_port_config(const struct device *port, gpio_flags_t *flags, + int buff_size); + +/** + * @brief Restore state of a GPIO controller port + * + * This function restore all pins current state from selected port. + * + * @param port Port to restore + * @param flags Buffer with gpio flags saved by ioex_save_gpio_config + */ +int gpio_restore_port_config(const struct device *port, gpio_flags_t *flags, + int buff_size); + +/** * @brief Reset all the GPIOs to default state * * This returns all pins from selected port to default state. The default flags |