diff --git a/micropython/usb/usb-device-hid/manifest.py b/micropython/usb/usb-device-hid/manifest.py index 88fa821c5..82a958c23 100644 --- a/micropython/usb/usb-device-hid/manifest.py +++ b/micropython/usb/usb-device-hid/manifest.py @@ -1,3 +1,3 @@ -metadata(version="0.2.0") +metadata(version="0.2.1") require("usb-device") package("usb") diff --git a/micropython/usb/usb-device-hid/usb/device/hid.py b/micropython/usb/usb-device-hid/usb/device/hid.py index e4d1bc53f..56eb3e8a1 100644 --- a/micropython/usb/usb-device-hid/usb/device/hid.py +++ b/micropython/usb/usb-device-hid/usb/device/hid.py @@ -92,7 +92,8 @@ def __init__( self.report_descriptor = report_descriptor self.extra_descriptors = extra_descriptors self._set_report_buf = set_report_buf - self.protocol = protocol + self.interface_protocol = protocol # descriptor value, constant + self.protocol = 1 # runtime mode: 0 boot, 1 report (HID 1.11 F.5) self.interface_str = interface_str self.interval_ms = interval_ms @@ -138,9 +139,9 @@ def desc_cfg(self, desc, itf_num, ep_num, strs): 1, _INTERFACE_CLASS, _INTERFACE_SUBCLASS_NONE - if self.protocol == _INTERFACE_PROTOCOL_NONE + if self.interface_protocol == _INTERFACE_PROTOCOL_NONE else _INTERFACE_SUBCLASS_BOOT, - self.protocol, + self.interface_protocol, len(strs) if self.interface_str else 0, )