File tree 3 files changed +10
-3
lines changed
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 17
17
package main
18
18
19
19
import (
20
- "time"
21
-
22
20
"tinygo.org/x/bluetooth"
23
21
)
24
22
25
23
var adapter = bluetooth .DefaultAdapter
26
24
27
25
func main () {
28
- time . Sleep ( 3 * time . Second )
26
+ wait ( )
29
27
30
28
println ("enabling" )
31
29
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ func connectAddress() string {
13
13
return deviceAddress
14
14
}
15
15
16
+ // wait on baremetal, proceed immediately on desktop OS.
17
+ func wait () {
18
+ time .Sleep (3 * time .Second )
19
+ }
20
+
16
21
// done just blocks forever, allows USB CDC reset for flashing new software.
17
22
func done () {
18
23
println ("Done." )
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ func connectAddress() string {
16
16
return address
17
17
}
18
18
19
+ // wait on baremetal, proceed immediately on desktop OS.
20
+ func wait () {
21
+ }
22
+
19
23
// done just prints a message and allows program to exit.
20
24
func done () {
21
25
println ("Done." )
You can’t perform that action at this time.
0 commit comments