The key change here is the new include_in_config property of USBDescriptor, which specifies whether the descriptor should be included in a GET_CONFIGURATION response.
Descriptors with this property set to True will appear following their parent in the GET_CONFIGURATION response, in the same order in which they were added with the add_descriptor() method. They will not be fetchable with a GET_DESCRIPTOR request, and do not require the number property to be set.
Descriptors with this property set to False will not be included in a GET_CONFIGURATION response. They can be fetched with a GET_DESCRIPTOR request, and must have the number 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 sets include_in_config to True.
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.