-
Notifications
You must be signed in to change notification settings - Fork 216
Swap to USB pad trait for thumv7em targets #365
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
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.
Awesomesauce!
I thought you looked familiar! I was at Kawaiicon last year + distantly work with Grace's team! 😀 Small world ^^ |
hah, wild how small it is sometimes ^_^ |
(WRT the PR, LGTM but as mentioned in #363 (comment) I'll wait till @bradleyharden has had a chance to look at it) |
From #362:
I added an implementation of If you want to stick with a new trait for other reasons, you might want to make |
The GPIO trait changes are merged in - is this ready to go @ryankurte / @bradleyharden or should we track one of the newer types? |
I'd be happy either way, just haven't yet had a moment to revisit / rebase to use the |
Went with the sealed approach which is a bit more complex but... also kindof nice in that you can click the trait and see the types it's implemented over more directly in the docs than looking via |
Thanks! Looks good to merge once we get CI green:
|
lmao wut |
According to the embedded rust chat something mad derped in cortex-m, that might have been the issue Fixed in rust-embedded/cortex-m#317 |
* Introduce pad trait for USB GPIOs, backwards-compatible with v1 * Sealed USB traits Co-authored-by: Twitch <[email protected]>
Supersedes #362, related to #363
An alternative approach that:
UsbPadD{m,p}
marker traits for implementation over USB padsUsbPadD{m, p}
marker trait over GPIO v1 and v2 types<Dm, Dp>
generic arguments toUsbBus
and other types that default to existing (v1) pad typesThis allows USB pad types to be overridden with something like:
While (hopefully) maintaining compatibility with previous users of
UsbBus
and v1 GPIOs.