Skip to content

usb: Propagate the result of submit_xfer. #1035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 5, 2025
Merged
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.1.0")
metadata(version="0.1.1")
require("usb-device")
package("usb")
1 change: 1 addition & 0 deletions micropython/usb/usb-device-hid/usb/device/hid.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def send_report(self, report_data, timeout_ms=100):
if not self.is_open():
return False
self.submit_xfer(self._int_ep, report_data)
return True

def desc_cfg(self, desc, itf_num, ep_num, strs):
# Add the standard interface descriptor
Expand Down
2 changes: 1 addition & 1 deletion micropython/usb/usb-device/manifest.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
metadata(version="0.2.0")
metadata(version="0.2.1")
package("usb")
3 changes: 2 additions & 1 deletion micropython/usb/usb-device/usb/device/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,8 @@ def submit_xfer(self, ep_addr, data, done_cb=None):
# function has returned to the caller.
if not self._open:
raise RuntimeError("Not open")
_dev._submit_xfer(ep_addr, data, done_cb)
if not _dev._submit_xfer(ep_addr, data, done_cb):
raise RuntimeError("DCD error")

def stall(self, ep_addr, *args):
# Set or get the endpoint STALL state.
Expand Down
Loading