linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben.hutchings@essensium.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Kent Gibson <warthog618@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Jack Winch <sunt.un.morcov@gmail.com>,
	Helmut Grohne <helmut.grohne@intenta.de>,
	linux-gpio@vger.kernel.org
Subject: Re: [libgpiod][PATCH v2 3/3] bindings: cxx: implement C++ bindings for libgpiod v2.0
Date: Fri, 16 Jul 2021 00:18:04 +0200	[thread overview]
Message-ID: <20210715221803.GA16338@cephalopod> (raw)
In-Reply-To: <20210715201001.23726-4-brgl@bgdev.pl>

On Thu, Jul 15, 2021 at 10:10:01PM +0200, Bartosz Golaszewski wrote:
> This is the bulk of work implementing C++ bindings for the new libgpiod
> API. The tests are not converted yet but the examples are fully
> functional. More details in the cover letter as this patch will be
> squashed with the one for the core C library anyway.
[...]
> +class line_config
> +{
> +public:
> +
> +	/**
> +	 * @brief Direction settings.
> +	 */
> +	enum : int {
> +		DIRECTION_AS_IS = 1,
> +		/**< Request the line(s), but don't change current direction. */
> +		DIRECTION_INPUT,
> +		/**< Request the line(s) for reading the GPIO line state. */
> +		DIRECTION_OUTPUT
> +		/**< Request the line(s) for setting the GPIO line state. */
> +	};
[...]
> +class line_info
> +{
> +public:
> +
> +	/**
> +	 * @brief Direction settings.
> +	 */
> +	enum : int {
> +		DIRECTION_INPUT = 1,
> +		/**< Direction is input - we're reading the state of a GPIO line. */
> +		DIRECTION_OUTPUT
> +		/**< Direction is output - we're driving the GPIO line. */
> +	};
[...]

Could these be enum class types, or does that introduce an ABI issue
if you extend them later?

Ben.

-- 
Ben Hutchings · Senior Embedded Software Engineer, Essensium-Mind · mind.be

  reply	other threads:[~2021-07-15 22:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15 20:09 [libgpiod][PATCH v2 0/3] libgpiod v2: C++ bindings Bartosz Golaszewski
2021-07-15 20:09 ` [libgpiod][PATCH v2 1/3] API: add a function for retrieving the capacity of edge event buffers Bartosz Golaszewski
2021-07-15 20:10 ` [libgpiod][PATCH v2 2/3] API: extend the line request functionality Bartosz Golaszewski
2021-07-15 20:10 ` [libgpiod][PATCH v2 3/3] bindings: cxx: implement C++ bindings for libgpiod v2.0 Bartosz Golaszewski
2021-07-15 22:18   ` Ben Hutchings [this message]
2021-07-16  7:44     ` Bartosz Golaszewski
2021-07-16  8:56       ` Bartosz Golaszewski
2021-07-16 13:24         ` Bartosz Golaszewski
2021-07-22 10:48           ` Jack Winch
2021-07-22 19:38             ` Bartosz Golaszewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210715221803.GA16338@cephalopod \
    --to=ben.hutchings@essensium.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=brgl@bgdev.pl \
    --cc=helmut.grohne@intenta.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=sunt.un.morcov@gmail.com \
    --cc=warthog618@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).