prototooth/adapter.go
Ayke van Laethem f2f9a517d0
Add flag for debug printing
This should normally be false, but can be set to true for debugging.
2020-05-25 17:26:24 +02:00

16 lines
432 B
Go

package bluetooth
// Set this to true to print debug messages, for example for unknown events.
const debug = false
// SetEventHandler sets the callback that gets called on incoming events.
//
// Warning: must only be called when the Bluetooth stack has not yet been
// initialized!
func (a *Adapter) SetEventHandler(handler func(Event)) {
a.handler = handler
}
// Event is a global Bluetooth stack event.
type Event interface{}