File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1717package main
1818
1919import (
20- "time"
21-
2220 "tinygo.org/x/bluetooth"
2321)
2422
2523var adapter = bluetooth .DefaultAdapter
2624
2725func main () {
28- time . Sleep ( 3 * time . Second )
26+ wait ( )
2927
3028 println ("enabling" )
3129
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ func connectAddress() string {
1313 return deviceAddress
1414}
1515
16+ // wait on baremetal, proceed immediately on desktop OS.
17+ func wait () {
18+ time .Sleep (3 * time .Second )
19+ }
20+
1621// done just blocks forever, allows USB CDC reset for flashing new software.
1722func done () {
1823 println ("Done." )
Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ func connectAddress() string {
1616 return address
1717}
1818
19+ // wait on baremetal, proceed immediately on desktop OS.
20+ func wait () {
21+ }
22+
1923// done just prints a message and allows program to exit.
2024func done () {
2125 println ("Done." )
You can’t perform that action at this time.
0 commit comments