Browse Source

descriptors: pass descriptor collection to ConfigurationDescriptorEmitter

This allows for downstream descriptor emitters to add indexed strings.

fixes #15
main
Mike Walters 3 years ago
parent
commit
b4ca79656b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      usb_protocol/emitters/descriptors/standard.py

+ 1
- 1
usb_protocol/emitters/descriptors/standard.py View File

@@ -284,7 +284,7 @@ class DeviceDescriptorCollection:
This adds the relevant descriptor, automatically. Note that populating derived
fields such as bNumInterfaces aren't necessary; they'll be populated automatically.
"""
descriptor = ConfigurationDescriptorEmitter()
descriptor = ConfigurationDescriptorEmitter(collection=self)
yield descriptor

self.add_descriptor(descriptor)


Loading…
Cancel
Save