-
Notifications
You must be signed in to change notification settings - Fork 18
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
unmount function called during mount, and the mount function called during unmount (IEC-203) #78
Comments
It works like this:
|
Is calling tinyusb_msc_storage_unmount in tud_mount_cb really correct ? It only does something if the firmware has previously mounted the storage (and probably do something with it). It will remove the access for the firmware with no way to refuse and can happen at any moment (user can plug the cable when he wants). May be a good way would be to add a way to refuse the unmont with a custom return value of the TINYUSB_MSC_EVENT_PREMOUNT_CHANGED callback fired in tinyusb_msc_storage_unmount ? I can do a PR if you think this is a good fix. |
There's another issue: Although two callback interfaces are provided:
there is a logical bug during actual use. The callback is only triggered the first time, and subsequent plug-in or unplug events do not trigger the callback. I believe a better approach would be to register a TinyUSB event and return the |
Answers checklist.
Which component are you using? If you choose Other, provide details in More Information.
device/esp_tinyusb
ESP-IDF version.
IDF release/v5.2
Development Kit.
ESP32S3
Used Component version.
1.4.5
More Information.
The function calls are opposite to the intended logic.
The text was updated successfully, but these errors were encountered: