Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3a7b150

Browse files
committed
usb: Propagate the result of submit_xfer.
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 <hyx0329@outlook.com>
1 parent f95568d commit 3a7b150

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+
returnself.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)

AltStyle によって変換されたページ (->オリジナル) /