-
Notifications
You must be signed in to change notification settings - Fork 76
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
Fixing processing order of EP0 (control) transactions #41
Fixing processing order of EP0 (control) transactions #41
Conversation
Hmm, yes, I believe processing them in this order will be more reliable because the SETUP is handled second, and that always resets everything back to working order. I wonder if we should also add |
That doesn't sound like a bad approach to me - I assume we would only
|
Thanks! My tests pass for this so I'll release a new version with these changes. This should make things more reliable in the future. |
This was fixed in usb-device: rust-embedded-community/usb-device#41
236: Migrate to Rust 2021 as part of the public testing r=richardeoin a=hargoniX Migration to Rust 2021 as part of the public testing. We did actually catch one ICE bug with this \o/: rust-lang/rust#87426 305: remove release mode requirement from USB examples r=richardeoin a=newAM This was fixed in usb-device: rust-embedded-community/usb-device#41 Co-authored-by: Henrik Böving <[email protected]> Co-authored-by: Richard Meadows <[email protected]> Co-authored-by: Alex Martens <[email protected]>
This was fixed in usb-device: rust-embedded-community/usb-device#41
This PR fixes an issue with the processing order of multiple EP0 events.
Specifically, if both EP0-IN and EP0-OUT events have occurred, we have to process EP0-IN first so that we update the
ControlState
properly. Otherwise, we inadvertently process the EP0-OUT status phase as a spurious OUT transfer (instead of the STATUS phase as expected).This only occurs when both EP0-OUT and EP0-IN transactions occur at the same time, which occurs when polling is completed at a lower-than-continuous rate.
After this fix, this crate can be used in
debug
configuration reliably as well.