Introduce two more layers between device and endpoint:
device -> active config -> claimed interface -> endpoints. Device can have at most one active config. A config can have multiple claimed interfaces, each with a specific alt setting. An interface with an alt setting defines a list of endpoints.
This commit is contained in:
@@ -68,7 +68,7 @@ func (c *Context) ListDevices(each func(desc *Descriptor) bool) ([]*Device, erro
|
||||
reterr = err
|
||||
continue
|
||||
}
|
||||
ret = append(ret, newDevice(handle, desc))
|
||||
ret = append(ret, &Device{handle: handle, Descriptor: desc})
|
||||
} else {
|
||||
libusb.dereference(dev)
|
||||
}
|
||||
|
Reference in New Issue
Block a user