@@ -63,7 +63,7 @@ class HIDDescriptor(ComplexDescriptorEmitter): | |||||
"null": null, | "null": null, | ||||
"volatile": volatile, | "volatile": volatile, | ||||
}) | }) | ||||
self.add_report(HIDPrefix.INPUT, ord(item_flags)) | |||||
self.add_report_item(HIDPrefix.INPUT, ord(item_flags)) | |||||
def add_output_item(self, | def add_output_item(self, | ||||
data_constant = False, | data_constant = False, | ||||
@@ -87,7 +87,7 @@ class HIDDescriptor(ComplexDescriptorEmitter): | |||||
"null": null, | "null": null, | ||||
"volatile": volatile, | "volatile": volatile, | ||||
}) | }) | ||||
self.add_report(HIDPrefix.OUTPUT, ord(item_flags)) | |||||
self.add_report_item(HIDPrefix.OUTPUT, ord(item_flags)) | |||||
def __init__(self, parent_descriptor): | def __init__(self, parent_descriptor): | ||||
super().__init__() | super().__init__() | ||||
@@ -63,7 +63,7 @@ ReportDescriptor = DescriptorFormat( | |||||
"bHeader" / construct.BitStruct( | "bHeader" / construct.BitStruct( | ||||
# prefix technically consists of a 4 byte tag and a 2 byte type, | # prefix technically consists of a 4 byte tag and a 2 byte type, | ||||
# however, they're all listed together in the HID spec | # 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), | "bSize" / construct.BitsInteger(2), | ||||
), | ), | ||||
"data" / construct.Byte[lambda ctx: _hid_item_length[ctx.bHeader.bSize]] | "data" / construct.Byte[lambda ctx: _hid_item_length[ctx.bHeader.bSize]] | ||||