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
USB: CDC adds set line coding callback #25613
Comments
This approach is not acceptable and not necessary. |
|
yes you have to poll it periodically. |
Polling it periodically is not a good way. Maybe poll it when having new data to receive or to send. |
Well the UART API does not provide that and usually baudrate does not change in the middle of a communication. To place an app hook in the processing of the control or class request or make it weak for a specific and not generic reason it not acceptable. Actually it is a bad API extension and will always make a problem during internal stack rework or redesign. It would also cause unnecessary latency and security issues. It is also not comparable wit HID because CDC ACM is self-contained implementation with clearly defined user interface (UART API). |
OK. I'd try it in my branch anyway. |
Is your feature request related to a problem? Please describe.
Want to create a USB to UART application, but no API to find out when the baud rate is changed
Describe the solution you'd like
May provide an API to register callbacks similar to USB HID callbacks
Describe alternatives you've considered
Or add a weak function to
cdc_acm_class_handle_req
, then we can override it.The text was updated successfully, but these errors were encountered: