support of CH340/341 CDC #2342
Closed
IngHK
started this conversation in
Show and tell
Replies: 2 comments 2 replies
-
Yippie! I got CH34x working 😃😃😃 |
Beta Was this translation helpful? Give feedback.
2 replies
-
is now merged to master |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello together,
due to a private craft project and to learn more about USB, I started expanding the CDC host to support the popular CH340/341.
I started with it just for fun and maybe something useful will come out of it that could flow into the TinyUSB when it matures.
I use the linux source drivers supplied by CH34x vendor as inspiration to implement the regarding functionality in cdc_host.
While implementing the process_config function, I stumbled upon a special of the CH34x.
It uses wIndex within the USB control outs to transmit baudrate settings.
For other cdc devices, wIndex is used to store the itf_num so that it can be restored when the process_config is called back.
This mechanism does not work with the CH34x because it uses wIndex differently.
My general question to everyone is what you think of my project and whether anyone has already had experience with the CH34x.
@hathach I saw in the git history that the cdc_host was developed almost exclusively by you. What would you suggest to restore the itf_num without wIndex? Using user_data packed together with status (one in low and the other in high byte)?
Kind Regards
Beta Was this translation helpful? Give feedback.
All reactions