Skip to content
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

Repurpose usb crate name for something useful #19

Open
kevinmehall opened this issue Nov 18, 2018 · 2 comments
Open

Repurpose usb crate name for something useful #19

kevinmehall opened this issue Nov 18, 2018 · 2 comments

Comments

@kevinmehall
Copy link
Owner

kevinmehall commented Nov 18, 2018

This obsolete library is sitting on a valuable crate name. We should repurpose it to create some common USB types, constants and traits that can be used across USB host and device implementations in Rust to improve interoperability, kind of like the http crate does for HTTP servers and clients.

Descriptors

These should be constructed by const fn and store their data in wire format so they can be constructed in flash as a static and used directly in DMA on devices that support this.

  • Device
  • Configuration
  • Interface
  • Endpoint
  • String
  • BOS
  • HID, CDC, etc (or should classes go in a separate crate?)
  • setup packets

Constants

  • bDeviceClass codes
  • Endpoint types
  • Standard control transfer requests

Traits for USB IO?

Not sure if these should be defined before async is usable in traits and on no_std.

@NickAtAccuPS
Copy link

NickAtAccuPS commented Jan 19, 2019

  • HID, CDC, etc (or should classes go in a separate crate?)

Probably best as a separate crate at least for HID, given that HID is abstracted over several buses.

@kevinmehall
Copy link
Owner Author

@japaric I noticed you're working on something like this at https://github.com/japaric/usb2 and would be happy to give you the usb name on crates.io for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants