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 ea763ca

Browse files
hyx0329dpgeorge
authored andcommitted
usb-device: Raise RuntimeError when DCD error occurs.
So the behavior matches the comment. Signed-off-by: Hyx <hyx0329@outlook.com>
1 parent 34c4ee1 commit ea763ca

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
metadata(version="0.2.0")
1+
metadata(version="0.2.1")
22
package("usb")

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,8 @@ 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+
if not _dev._submit_xfer(ep_addr, data, done_cb):
604+
raise RuntimeError("DCD error")
604605

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

0 commit comments

Comments
(0)

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