Closed matkor closed 2 years ago
you can attach one handler to multiple events and instances. The attachXXX methods support an additional parameter that can be passed to your handler to distinguish the use cases. This can be anythin (void ) including a integer (casted to void ) or a pointer to some data. - as you like.
Is it possible to use one (click/ press/ etc) handler for many OneButton instances and have pin id or OneButton reference passed to handler function?