ef90e5d337
* gattc: use UUID() to allow for bare metal to permit clean use of short UUIDs Signed-off-by: deadprogram <ron@hybridgroup.com> * gattc/macos: correct usage of UUID wrapper type alias Signed-off-by: Ron Evans <ron@hybridgroup.com> * gattc/sd: correct usage of UUID wrapper type alias Signed-off-by: Ron Evans <ron@hybridgroup.com> * gattc/sd, uuid/sd: changes intended to reduce memory allocations for service and characteristic discovery Signed-off-by: deadprogram <ron@hybridgroup.com> * gattc/sd: partial improvements to DiscoverServices/DiscoverCharacteristics Signed-off-by: deadprogram <ron@hybridgroup.com> * gattc/sd: mostly getting uuid back for services in DiscoverServices Signed-off-by: deadprogram <ron@hybridgroup.com> * uuid/sd: correct way to calculate UUID from shortUUID Signed-off-by: deadprogram <ron@hybridgroup.com> * gattc/sd: able to discover services and characteristics Signed-off-by: deadprogram <ron@hybridgroup.com> * examples: updated discover example that can run with OS or bare metal Signed-off-by: deadprogram <ron@hybridgroup.com> * gattc/sd: ensure safe casts for length of returned struct when converting short UUID Signed-off-by: deadprogram <ron@hybridgroup.com>
22 lines
382 B
Go
22 lines
382 B
Go
// +build baremetal
|
|
|
|
package main
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// replace this with the MAC address of the Bluetooth peripheral you want to connect to.
|
|
const deviceAddress = "E4:B7:F4:11:8D:33"
|
|
|
|
func connectAddress() string {
|
|
return deviceAddress
|
|
}
|
|
|
|
// done just blocks forever, allows USB CDC reset for flashing new software.
|
|
func done() {
|
|
println("Done.")
|
|
|
|
time.Sleep(1 * time.Hour)
|
|
}
|