-
-
Notifications
You must be signed in to change notification settings - Fork 80
[EV3] New USB driver, batch 1 #340
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
dlech
left a comment
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.
This is pretty dense so I had to give up about half way through, but here a few comments anyway.
441fb06 to
fa15ccb
Compare
|
Rebased this to be totally up to date with the latest merges. Also uses |
8557289 to
bbc7de3
Compare
|
I've just implemented all the requested changes. |
dlech
left a comment
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.
I did some work on USB in the meantime, so I found a few more details that I missed before with better trained eyes.
And it would be nice if we could make the commit messages a bit more descriptive for our future selves.
Otherwise, this looks good to go.
The TI CDC-ACM serial port is to be replaced by the custom Pybricks protocol. For now, delete all of the existing code and stub out necessary functions.
Delete this library so that we do not accidentally use it. It is not license-compatible with the GPL.
These are the most basic steps needed for a USB peripheral to be detected. After this commit, hosts will notice a USB device, but the device will not function because none of the required USB requests are handled.
These data types are defined in Chapter 9 of the USB standard and consistute the "USB Device Framework".
After this commit, the brick will be able to enumerate as a USB device. There is no data transfer implemented, but requests mandated by the USB standard are implemented so that the device is fully detected.
This currently implements an echo test rather than hooking up command handlers. This scaffolding is required before implementing the Pybricks protocol.
|
Done! |
|
OK! Let's call it good enough and move on to the next one. |
This is batch 1 of reimplementing the EV3 USB support using a bespoke USB stack.
It currently provides only standard USB descriptors. When data is sent to the EP1 OUT endpoint, it will be echoed back (with the value 1 added to each byte) on EP1 IN.
The next steps will involve refactoring out some of the shared WebUSB/Microsoft descriptor creation code as well as hooking this up to existing command handlers.