From b4ca79656bc3e55c0342f0661e6fde2e434d150c Mon Sep 17 00:00:00 2001 From: Mike Walters Date: Wed, 17 Mar 2021 12:51:15 +0000 Subject: [PATCH] descriptors: pass descriptor collection to ConfigurationDescriptorEmitter This allows for downstream descriptor emitters to add indexed strings. fixes #15 --- usb_protocol/emitters/descriptors/standard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usb_protocol/emitters/descriptors/standard.py b/usb_protocol/emitters/descriptors/standard.py index 52bc2c7..082d7b8 100644 --- a/usb_protocol/emitters/descriptors/standard.py +++ b/usb_protocol/emitters/descriptors/standard.py @@ -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)