Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An attempt to fix #125.
The key change here is the new
include_in_config
property ofUSBDescriptor
, which specifies whether the descriptor should be included in aGET_CONFIGURATION
response.Descriptors with this property set to
True
will appear following their parent in theGET_CONFIGURATION
response, in the same order in which they were added with theadd_descriptor()
method. They will not be fetchable with aGET_DESCRIPTOR
request, and do not require thenumber
property to be set.Descriptors with this property set to
False
will not be included in aGET_CONFIGURATION
response. They can be fetched with aGET_DESCRIPTOR
request, and must have thenumber
property set to an integer value, so that they can be retrieved by the identifying tuple of(type_number, number)
.The
USBClassDescriptor
class is deprecated, but retained for backwards compatibility. It now simply setsinclude_in_config
toTrue
.Stacked on #122 for now.