-
Notifications
You must be signed in to change notification settings - Fork 3k
USBDevice HAL specification improvements #6276
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
USBDevice HAL specification improvements #6276
Conversation
Add a function to check if the USBPhy is powered.
Move the powerdown code from destructor to deinit. This is required to so USB interrupts can be disabled before calling the destructor. This patch also performs cosmetic cleanup.
Make use of the new init and deinit APIs provided by USBDevice. This allows for graceful USB shutdown.
Add the following new USBDevice functions: init() deinit() sof_enable() sof_disable() callback_sof(); Additionally, move USBDevice specific types out of USBDevice_Types and into USBDevice itself.
Make the USB lock functions virtual so they can be overridden.
Prefix all the private USBDevice methods and members with an underscore to match the mbed-os naming convention.
Add doxygen to functions in USBDevice which were missing it.
Add additional requirements to the defined and undefined behavior of USBPhy.
I can't seem to add you as reviewers @maciejbocianski and @fkjagodzinski. Could you review this PR? |
/morph build |
Build : SUCCESSBuild number : 1349 Triggering tests/morph test |
ee26096
to
77e9329
Compare
/morph test |
@c1728p9 Is there a reason that you're triggering builds and tests before reviewers have OK'd the PR? Also, if you add a commit to a PR, you'll need to do a morph build, since the other morph commands use the artifacts from the last morph build to do their thing. |
Exporter Build : SUCCESSBuild number : 1003 |
Test : SUCCESSBuild number : 1129 |
Test : FAILUREBuild number : 1130 |
This was to get a head start on testing. It was the evening so I figured the CI pipeline would be empty. Is this a problem? |
Break apart USBPhy into three separate header files. Also make some doxygen updates.
77e9329
to
2a94a3d
Compare
Update doxygen which should now be in sync with ARMmbed/mbed-os-5-docs#438 |
/morph build |
Work in progress for the USB technology page can be found here: |
Build : SUCCESSBuild number : 1373 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1026 |
Looks good to me |
Test : SUCCESSBuild number : 1154 |
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.
LGTM
Add a commit to simplify handling of aborted control transfers. Updated docs reflecting this can be found here: |
Call callback_request_xfer_done regardless of if the current transfer is aborted if complete_request is called with a buffer to send or fill. This makes memory management much easier. This patch also adds an aborted parameter to callback_request_xfer_done so the code can check if the transfer was aborted.
1685204
to
a899993
Compare
/morph build |
Build : SUCCESSBuild number : 1383 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1037 |
Test : SUCCESSBuild number : 1166 |
Expand USBPhy API, cleanup the code and add doxygen.