-
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
Adding USB tracing, fixing further enumeration issues #142
Conversation
@eldruin / @thejpster / @mvirkkunen I've tested this with 2 STM devices (Booster and Stabilizer, an STM32H7 and an STM32F4) successfully, and it reportedly fixed one of our users issues where the device was not enumerating properly (ref quartiq/stabilizer#817), so I think it'd be beneficial to get this landed and re-released as a potential 0.3.1 :) |
I successfully updated one of the rp2040 examples (https://github.com/rp-rs/rp-hal-boards/blob/773ee73bfdff66d080dda528bfd03db845b75967/boards/rp-pico/examples/pico_usb_twitchy_mouse.rs) to use this version of usb-device. That probably doesn't test many code paths, and I only have linux hosts to test it with, but at least this makes sure that your changes don't break USB on the rp2040 completely. |
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.
Looks fine to me but I do not know how it works :)
You can decide whether to wait for an opinion from @mvirkkunen.
I'm going to merge this for now and aim for releasing soon to give some feedback period from anyone wanting to test it out. Thanks for taking a look everyone, I know USB can be extremely opaque - I'm no expert myself. |
This PR does a few things:
set_error()
calls when processing a SETUP packet. We are not allowed to error in this state and should simply ignore the SETUP packet instead.This effectively reverts #41, as further updates to EP0 control pipe handling make it unnecessary. Reversion of this PR prevents us from sending more data in a control transfer than is expected, since the host may have initiated the STATUS phase of the transfer already.