diff --git a/usb_protocol/emitters/descriptors/hid.py b/usb_protocol/emitters/descriptors/hid.py index 47b4193..f5b63db 100644 --- a/usb_protocol/emitters/descriptors/hid.py +++ b/usb_protocol/emitters/descriptors/hid.py @@ -63,7 +63,7 @@ class HIDDescriptor(ComplexDescriptorEmitter): "null": null, "volatile": volatile, }) - self.add_report(HIDPrefix.INPUT, ord(item_flags)) + self.add_report_item(HIDPrefix.INPUT, ord(item_flags)) def add_output_item(self, data_constant = False, @@ -87,7 +87,7 @@ class HIDDescriptor(ComplexDescriptorEmitter): "null": null, "volatile": volatile, }) - self.add_report(HIDPrefix.OUTPUT, ord(item_flags)) + self.add_report_item(HIDPrefix.OUTPUT, ord(item_flags)) def __init__(self, parent_descriptor): super().__init__() diff --git a/usb_protocol/types/descriptors/hid.py b/usb_protocol/types/descriptors/hid.py index 39305e2..7c814f7 100644 --- a/usb_protocol/types/descriptors/hid.py +++ b/usb_protocol/types/descriptors/hid.py @@ -63,7 +63,7 @@ ReportDescriptor = DescriptorFormat( "bHeader" / construct.BitStruct( # prefix technically consists of a 4 byte tag and a 2 byte type, # however, they're all listed together in the HID spec - "prefix" / construct.Enum(construct.BitsInteger(6), HIDPrefixes), + "prefix" / construct.Enum(construct.BitsInteger(6), HIDPrefix), "bSize" / construct.BitsInteger(2), ), "data" / construct.Byte[lambda ctx: _hid_item_length[ctx.bHeader.bSize]]