Adding USB tracing, fixing further enumeration issues#142
Adding USB tracing, fixing further enumeration issues#142ryan-summers merged 7 commits intomasterfrom
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. |
eldruin
left a comment
There was a problem hiding this comment.
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.