warthog618 / go-gpiocdev

A native Go library for accessing GPIO lines on Linux platforms using the GPIO character device

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can WithDebounce be used together with WithEventHandler

JulianStremel opened this issue · comments

I am currently unable to test this on real Hardware and i cant seem to find anything about which configurations are compatible together.

Kind regards

You can use WithDebounce and WithEventHandler together. That is the primary function of debounce, after all.

The only options that cannot be used together are options that apply to only input lines or output lines, e.g. debounce (input) and drive (output), but the primary conflict is with the AsOutput or AsInput options. The documentation states whether an option applies only to inputs or outputs. If not stated then it works for both.