bluetooth/adapter.go
deadprogram 564b0ba58f all: use 'debug' variable protected by build tags for debug logging
Signed-off-by: deadprogram <ron@hybridgroup.com>
2024-01-16 17:25:37 +01:00

9 lines
356 B
Go

package bluetooth
// SetConnectHandler sets a handler function to be called whenever the adaptor connects
// or disconnects. You must call this before you call adaptor.Connect() for centrals
// or adaptor.Start() for peripherals in order for it to work.
func (a *Adapter) SetConnectHandler(c func(device Device, connected bool)) {
a.connectHandler = c
}