Support malformed interface descriptors (#79)
* Add an invalid interface descriptor to one of the test devices. * Add a test for getting that interface description. * Handle the malformed interface/alternate setting descriptors, where interface/alt numbers don't follow the spec (not 0-based, not contiguous etc.) Addresses issue #65.
This commit is contained in:

committed by
GitHub

parent
18f4c1d8a7
commit
9ad54830f4
@@ -23,8 +23,7 @@ import (
|
||||
// InterfaceDesc contains information about a USB interface, extracted from
|
||||
// the descriptor.
|
||||
type InterfaceDesc struct {
|
||||
// Number is the number of this interface, a zero-based index in the array
|
||||
// of interfaces supported by the device configuration.
|
||||
// Number is the number of this interface.
|
||||
Number int
|
||||
// AltSettings is a list of alternate settings supported by the interface.
|
||||
AltSettings []InterfaceSetting
|
||||
|
Reference in New Issue
Block a user