mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-12 15:03:41 +00:00
Discover USB ports only
This will ignore f.ex. bluetooth
This commit is contained in:
@@ -714,7 +714,9 @@ func getDefaultPort(portCandidates []string) (port string, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, p := range portsList {
|
for _, p := range portsList {
|
||||||
ports = append(ports, p.Name)
|
if p.IsUSB {
|
||||||
|
ports = append(ports, p.Name)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ports == nil || len(ports) == 0 {
|
if ports == nil || len(ports) == 0 {
|
||||||
|
|||||||
Reference in New Issue
Block a user