Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion micropython/usb/usb-device-hid/manifest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
metadata(version="0.2.0")
metadata(version="0.2.1")
require("usb-device")
package("usb")
7 changes: 4 additions & 3 deletions micropython/usb/usb-device-hid/usb/device/hid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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,
)

Expand Down
Loading