1.1 --- a/pkg/devices/lib/gpio/include/gpio.h Fri Sep 22 21:56:34 2023 +0200
1.2 +++ b/pkg/devices/lib/gpio/include/gpio.h Sun Sep 24 01:53:43 2023 +0200
1.3 @@ -2,7 +2,7 @@
1.4 * GPIO driver definitions.
1.5 * (See below for additional copyright and licensing notices.)
1.6 *
1.7 - * Copyright (C) 2017, 2018 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2017, 2018, 2023 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -80,6 +80,7 @@
1.13 {
1.14 Function_gpio,
1.15 Function_alt,
1.16 + Function_irq,
1.17 };
1.18
1.19 virtual void request(unsigned pin) = 0;
1.20 @@ -123,6 +124,14 @@
1.21 virtual void config_get(unsigned pin, unsigned func, unsigned *value) = 0;
1.22
1.23 /**
1.24 + * \brief Get platform specific pad configuration.
1.25 + * \param pin the pin to configure.
1.26 + * \param func a platform specific sub-function of a pad to be configured
1.27 + * \param value a platform specific value for the given sub-function.
1.28 + */
1.29 + virtual void config_pad_get(unsigned pin, unsigned *func, unsigned *value) = 0;
1.30 +
1.31 + /**
1.32 * \brief Get the value of the given pin (generic API).
1.33 * \param pin the pin to read the value from.
1.34 */
1.35 @@ -210,6 +219,7 @@
1.36 {
1.37 Function_gpio,
1.38 Function_alt,
1.39 + Function_irq,
1.40 };
1.41
1.42 #endif /* __cplusplus */