-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
3b8bad4 to
3a7b150
Compare
|
Could you add a test to verify this in CI? Or is this already covered by another test? |
|
There is a comment in I guess that's either incorrect and should be changed, or is correct and then this PR is not needed. @projectgus maybe we need your input here. |
|
Hmm, yeah - the underlying In general, @hyx0329 Thanks for pointing this out and submitting the fix. Are you up for updating your PR along these lines? |
3a7b150 to
6e46847
Compare
|
I've updated the PR with the proposed changes. It should work now. As to the test, I have no idea how to do it with software only. Core depends on |
projectgus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hyx0329, this fix looks good to me.
We don't currently have any way to test the micropython-lib usb classes in CI. Running the examples manually is the best we can do. 🫤
So the behavior matches the comment. Signed-off-by: Hyx <hyx0329@outlook.com>
This tells the caller that no error has occurred. The child classes can use this state to do double buffering correctly. If any fundamental error occurs in submit_xfer, the underlying code will raise an exception. Signed-off-by: Hyx <hyx0329@outlook.com>
6e46847 to
bdc4706
Compare
The result is used in the hid keyboard module but was not actually propagated. With this result, the report double buffering will work correctly.