Skip to content

Commit 3b8bad4

Browse files
committed
usb: propagate submit_xfer result
The result is used in the example but was not actually propagated. With this result, the report double buffering will work correctly. Signed-off-by: Hyx <[email protected]>
1 parent f95568d commit 3b8bad4

File tree

2 files changed

+2
-2
lines changed
  • micropython/usb

2 files changed

+2
-2
lines changed

micropython/usb/usb-device-hid/usb/device/hid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def send_report(self, report_data, timeout_ms=100):
122122
machine.idle()
123123
if not self.is_open():
124124
return False
125-
self.submit_xfer(self._int_ep, report_data)
125+
return self.submit_xfer(self._int_ep, report_data)
126126

127127
def desc_cfg(self, desc, itf_num, ep_num, strs):
128128
# Add the standard interface descriptor

micropython/usb/usb-device/usb/device/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ def submit_xfer(self, ep_addr, data, done_cb=None):
600600
# function has returned to the caller.
601601
if not self._open:
602602
raise RuntimeError("Not open")
603-
_dev._submit_xfer(ep_addr, data, done_cb)
603+
return _dev._submit_xfer(ep_addr, data, done_cb)
604604

605605
def stall(self, ep_addr, *args):
606606
# Set or get the endpoint STALL state.

0 commit comments

Comments
 (0)