brian-armstrong / gpio

Go library to do GPIO on systems with /sys/class/gpio (sysfs)
BSD 3-Clause "New" or "Revised" License
139 stars 50 forks source link

Add Logic Level setting support to sysfs and channel to Watcher. #3

Closed joeblubaugh closed 6 years ago

joeblubaugh commented 6 years ago

Adds support for setting the "active_low" value for a given pin. Let's clients control whether "1" indicates low voltage or high voltage.

Adds support for setting the Edge and LogicLevel when watching a Pin with the Watcher.

Exposes the WatcherNotify channel for the watcher so clients can watch these values directly without blocking or creating a separate channel.

brian-armstrong commented 6 years ago

Sorry for the conflicts. I thought that exporting the notification channel was a great idea, so I went ahead and added it. I'd still be interested in merging this, assuming it passes review :)

joeblubaugh commented 6 years ago

thanks Brian! personal stuff has kept me from doing any outside-work programming, but I'd still like to land this. I'll try to clean it up with the new version some time in the next few weeks.

joeblubaugh commented 6 years ago

@brian-armstrong I believe I've addressed your feedback, please take a look!

brian-armstrong commented 6 years ago

Perfect, thanks