periph / conn

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

gpio: refactor edge argument from In() into its own function Edges() #4

Open maruel opened 3 years ago

maruel commented 3 years ago

Make the function more generic and split the edges from the input.

Edges() would work similar to SenseContinuous() (albeit without an interval) and use a context.Context. Then In() is simplified. There's some API design work still needed.

(ported from https://github.com/google/periph/issues/383)