infinitime/btsetup.go

23 lines
341 B
Go
Raw Normal View History

2021-08-20 00:41:09 +00:00
package infinitime
import (
bt "github.com/muka/go-bluetooth/api"
"github.com/muka/go-bluetooth/bluez/profile/adapter"
)
var defaultAdapter *adapter.Adapter1
func init() {
// Get bluez default adapter
da, err := bt.GetDefaultAdapter()
if err != nil {
panic(err)
}
defaultAdapter = da
}
func Exit() error {
return bt.Exit()
}