-
Notifications
You must be signed in to change notification settings - Fork 3k
Bring USB Feature branch into master #9768
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
@c1728p9, thank you for your changes. |
@c1728p9 Why is this PR your fork instead of |
Also, any chance of progressing these other PRs coming into the ARMmbed feature branch? |
Both of these need updates. It may be best re-create these PRs against master once this goes in. |
@ARMmbed/mbed-os-maintainers Note, this is a rebase I'm fine with letting this come in asis, and removing |
Added SPDX license identifiers and fixed astyle problems. |
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.
Seems ok to me!
Will there be a future PR to remove the unsupported USB stack? https://github.com/ARMmbed/mbed-os/tree/master/features/unsupported/USBDevice
""" | ||
|
||
list = [64, 256] | ||
dev = y |
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.
Holy smokes, what a host test! 🚢
When you run the `tests-usb_device-basic` test suite on a Linux machine, please make | ||
sure that at least one of the following prerequisites are met: | ||
* using the Linux kernel ***4.17* or newer**, | ||
* using the ***eHCI*** USB driver instead of *xHCI*. |
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.
@ARMmbed/mbed-os-test FYI
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.
@c1728p9 What's the technical reason for this limitation?
Are we expecting devlopers to have to load a specific OS driver to be able to test in Linux?
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.
@c1728p9 What's the technical reason for this limitation?
Basically, an incomplete implementation of xHCI driver in kernels prior to 4.17. Please see the rest of this readme. I've also included some links for reference.
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.
Basically, an incomplete implementation of xHCI driver in kernels prior to 4.17. Please see the rest of this readme. I've also included some links for reference.
Damn, those are actually good technical reasons...
Thanks for having them in the readme.
@ARMmbed/mbed-os-maintainers be aware, USB tests are currently not part of CI. @OPpuolitaival will need to make some infrastructure changes to enable this. The two biggest limitations are:
|
Add the USBPhy and USBPhyEvents abstract classes, the HAL header using this class and the EndpointResolver utility class.
Copy the USBDevice code out of unsupported and into a top level USB folder in preparation for development. squash
Update USB licenses from MIT to Apache 2 and run astyle on the code.
Update the USBDevice class API so it matches mbed-os's naming conventions, has a more robust API and uses USBPhy as its backend.
Add a USB test and the class USBTester.cpp to go along with it.
Move the LPC17xx USB driver files from mbed-os\features\unsupported\USBDevice\targets\TARGET_NXP and update them to match the new USBPhy API.
This function is for USB_OTG_FS devices only. Move it in the correct place (in "#ifdef USB_OTG_FS" area).
Abort all endpoint transfers before running the test again. Use an updated vendor request to explicitly restart device reads.
Remove mbed.h from USB files and fix the build errors this causes. This is required to pass CI.
Update the header of all files to use a newer license template which includes SPDX-License-Identifier.
Add an upper bound to the API version of pyusb. Co-Authored-By: c1728p9 <[email protected]>
152f9a4
to
0e6056b
Compare
Rebased to fix conflicts with requirements.txt changes |
While reviewing, early CI run now |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
@fkjagodzinski @jeromecoutant @ARMmbed/mbed-os-core @ARMmbed/mbed-os-hal @ARMmbed/mbed-os-test @bulislaw @donatieng @SenRamakri Please review. This appears to be ready for merge. |
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.
Looks good for me 👍
This PR is at risk of missing 5.12 release as it's marked as "needs: review". Code freeze is coming! On Friday 1st. Please review the changes ASAP. @ARMmbed/mbed-os-hal |
1 similar comment
This PR is at risk of missing 5.12 release as it's marked as "needs: review". Code freeze is coming! On Friday 1st. Please review the changes ASAP. @ARMmbed/mbed-os-hal |
Description
Bring feature-hal-spec-usb-device into master.
Pull request type
Reviewers
Release Notes
This feature brings USB Device support into Mbed OS from a feature branch. Targets that support USB include the LPC1768, ARCH_PRO, K64F, NUCLEO_F207ZG, NUCLEO_F412ZG, DISCO_F413ZH, NUCLEO_F413ZH, NUCLEO_F429ZI, NUCLEO_F446ZE, NUCLEO_F746ZG, NUCLEO_F756ZG, NUCLEO_F767ZI, DISCO_F469NI, DISCO_F746NG, DISCO_F769NI, DISCO_L475VG_IOT01A, DISCO_L476VG, RZ_A1H, GR_LYCHEE, DISCO_L496AG, NUCLEO_L496ZG, NUCLEO_L4R5ZI. Supported USB device classes include USBAudio, USBHID, USBMouse, USBKeyboard, USBMIDI, USBMSD, USBSerial and USBCDC.