periph / conn

Go·Hardware·Lean - Interfaces
https://periph.io
Apache License 2.0
65 stars 11 forks source link

gpio: add Group interface, to act on multiple GPIO as a single transaction #30

Open maruel opened 10 months ago

maruel commented 10 months ago

Ported from https://github.com/google/periph/issues/372.

Let's aim to have at least an idea how a gpio.Group would look like. A Group would be a logical group, not a physical one. To clarify, we're not talking about GPIOs grouped together on a header, I'm talking about GPIOs that are on the same controller thus can be acted on upon as a transaction. See the previous comment for precedents.

My thinking at the moment is to:

The interface Group would contain the transactional operations.