Add a test for InEndpoint.Read. Use ID for vid/pid in OpenDevice...
This commit is contained in:
@@ -82,7 +82,7 @@ func (c *Context) ListDevices(each func(desc *Descriptor) bool) ([]*Device, erro
|
||||
// If there were any errors during device list traversal, it is possible
|
||||
// it will return a non-nil device and non-nil error. A Device.Close() must
|
||||
// be called to release the device if the returned device wasn't nil.
|
||||
func (c *Context) OpenDeviceWithVidPid(vid, pid int) (*Device, error) {
|
||||
func (c *Context) OpenDeviceWithVidPid(vid, pid ID) (*Device, error) {
|
||||
var found bool
|
||||
devs, err := c.ListDevices(func(desc *Descriptor) bool {
|
||||
if found {
|
||||
|
Reference in New Issue
Block a user