-
Notifications
You must be signed in to change notification settings - Fork 82
Add Development+Testing section to README.md #101
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,9 +37,18 @@ Class crates | |
* [usbd-hid](https://github.com/twitchyliquid64/usbd-hid) [](https://crates.io/crates/usbd-hid) - HID class | ||
* [usbd-serial](https://github.com/mvirkkunen/usbd-serial) [](https://crates.io/crates/usbd-serial) - CDC-ACM serial port class | ||
|
||
Development | ||
----------- | ||
|
||
### Testing | ||
|
||
Testing `usb-device` involves a test suite running on a host computer, connected via USB to a target computer (microcontroller) which provides a test device. `usb-device` provides interfaces to hardware drivers, but it does not provide any hardware drivers, so external crates are required to run the test suite on specific hardware: | ||
|
||
* [stm32-usbd-tests](https://github.com/Disasm/stm32-usbd-tests) for STM32 parts. | ||
* [test-usb-device](https://github.com/ianrrees/test-usb-device) for ATSAMD parts. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we instead just incorporate them as a member of the workspace here, so they don't get outdated? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe, that's partly what I'm wondering about in #100 . I'd imagine the overwhelming majority of users of usb-device aren't going to be interested in this device-specific test code. As someone who spends more time tinkering with code that implements usb-device traits, rather than usb-device itself, I'd prefer to have the device-specific usb-device test code with whatever HAL it needs. That HAL already will have usb-device as a dependency, which I believe covers the versioning concerns. That said, I think we could bring together the documentation from these usb-device test repos, because that's mostly about testing usb-device in general. I could imagine that documentation and test app expanding to cover other topics that might span multiple implementations of usb-device, for instance performance or feature sets. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The While having device-specific code isn't the purpose of I worry that pointing to separate repos for the device-specific test code will result in the situation that we currently have in the future where the test code is lost and no one knows how to test :P There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
My comment could've been written better. With "users". I was referring to both the people who would use I agree that the details of how testing works probably don't matter to the consumers, but think it is still important to not make things worse for them. Putting stuff in usb-device that won't be used by consumers is, to a small degree, making things worse for them - it's bloat that manifests in wasted bandwidth and disk. Part of the question is how that presumably-small impact to many people compares to the impact to a small number of developers.
The test code I made was a low-effort thing (in terms of |
||
|
||
Others | ||
------ | ||
|
||
Other implementations for USB in Rust | ||
* [embassy-usb](https://github.com/embassy-rs/embassy/blob/master/embassy-usb/src/driver.rs), an async variant. | ||
* [embassy-usb](https://github.com/embassy-rs/embassy/blob/master/embassy-usb/src/driver.rs), an async variant. |
Uh oh!
There was an error while loading. Please reload this page.