Rename ListDevices to OpenDevices. Add more doc for RemoteWakeup.

This commit is contained in:
Sebastian Zagrodzki
2017-06-13 10:55:30 +02:00
parent e1fd376a2e
commit 67ddfbabc2
4 changed files with 17 additions and 12 deletions

View File

@@ -80,7 +80,7 @@ func Example_complex() {
// Iterate through available Devices, finding all that match a known VID/PID.
vid, pid := gousb.ID(0x04f2), gousb.ID(0xb531)
devs, err := ctx.ListDevices(func(desc *gousb.DeviceDesc) bool {
devs, err := ctx.OpenDevices(func(desc *gousb.DeviceDesc) bool {
// this function is called for every device present.
// Returning true means the device should be opened.
return desc.Vendor == vid && desc.Product == pid
@@ -90,7 +90,7 @@ func Example_complex() {
defer d.Close()
}
if err != nil {
log.Fatalf("ListDevices(): %v", err)
log.Fatalf("OpenDevices(): %v", err)
}
if len(devs) == 0 {
log.Fatalf("no devices found matching VID %s and PID %s", vid, pid)