feat(usb_host): MSC Host add suspend/resume events #181
+459
−25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This MR adds Suspend/Resume events for MSC class driver as a follow-up for the Global/Suspend resume feature for usb component.
Added a backward compatibility for older IDF releases, where the suspend/resume will not be backported, by:
Related
Testing
Checklist
Before submitting a Pull Request, please ensure the following:
Note
Add global suspend/resume support to MSC host (new events and client handling) with backward-compatible API guard and comprehensive test coverage.
MSC_DEVICE_SUSPENDEDandMSC_DEVICE_RESUMEDevents; handleUSB_HOST_CLIENT_EVENT_DEV_SUSPENDED/DEV_RESUMEDinclient_event_cb(switch-based refactor, improved logs).usb/usb_host.h; update SPDX years.include/usb/msc_host.h):MSC_HOST_SUSPEND_RESUME_API_SUPPORTED(defined ifUSB_HOST_LIB_EVENT_FLAGS_AUTO_SUSPEND).msc_host_event_tto carry suspended/resumed events and use device handle for them.test_app/main/test_msc.c):suspend_resume,auto_suspend_timer(one-shot/periodic PM),resume_by_transfer_submit,suspended_device_open_close,suspended_device_sudden_disconnect,sudden_suspend,sudden_suspend_from_another_task.wait_for_app_event, unify base path viaBASE_PATH, handleUSB_HOST_LIB_EVENT_FLAGS_AUTO_SUSPEND, and minor fixes (typos, cleanup).Written by Cursor Bugbot for commit db50486. This will update automatically on new commits. Configure here.