Skip to content
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

CDCh tuh_cdc_mounted() returns true before process config is completed (also HIDh?) #2437

Closed
1 task done
IngHK opened this issue Jan 29, 2024 · 0 comments
Closed
1 task done
Labels

Comments

@IngHK
Copy link

IngHK commented Jan 29, 2024

Operating System

Others

Board

Firmware

What happened ?

If an application uses tuh_cdc_mounted() to check whether a CDC device is mounted, it will be reported "true" before the process config is completed.
The application could then disrupt the process config or the application would not yet be able to work with the CDC device.
tuh_cdc_mount_cb() is correctly called in set_config_complete() after the process config has been completed.
the hid host may have the same issue...

How to reproduce ?

Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)

Screenshots

No response

I have checked existing issues, dicussion and documentation

  • I confirm I have checked existing issues, dicussion and documentation.
@IngHK IngHK added the Bug 🐞 label Jan 29, 2024
hathach added a commit that referenced this issue Jan 30, 2024
fix of #2437 CDCh tuh_cdc_mounted() returns true before process config is completed
IngHK pushed a commit to IngHK/tinyusb that referenced this issue Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant