tinyusb icon indicating copy to clipboard operation
tinyusb copied to clipboard

CHCh Upgrade: Improved FTDI and CP210x support, add PL2303 support, bugfixes

Open IngHK opened this issue 1 year ago • 13 comments

This PR is the kick-off of the series of single commits, which should result in the following improvements:

  • Improved support of FTDI: support of all popular types (B/R/H, single and multiple channels), support of set line coding, data format, baudrate, line state
  • Improved support of CP210x: support of set line coding, data format, baudrate, line state
  • Added PL2303 support
  • Added continuation of enumeration after TU_ASSERT
  • Bugfix #2448 and several other bugfixes

I think, it's easier to review the changes commit for commit. After review of each commit, I'll implement and commit it together with the next improvement. So this PR should be first merged to master at the end. OK?

IngHK avatar Feb 22 '24 20:02 IngHK

@IngHK thank you, though don't worry too much about the number of commits etc, just make it convenient for you. I don't always have time to review things (pending PRs is already long enough), but small change is indeed easier to review. So just group thing together as long as you think that make sense. The current PR only update comment, do you have anything to push more or you want to merge this as it is.

hathach avatar Feb 23 '24 18:02 hathach

@IngHK thank you, though don't worry too much about the number of commits etc, just make it convenient for you. I don't always have time to review things (pending PRs is already long enough), but small change is indeed easier to review. So just group thing together as long as you think that make sense. The current PR only update comment, do you have anything to push more or you want to merge this as it is.

Yes, I know, the first commit is pretty small, only to warm up ;-) The next commit sorts the diver functions into the sections Control Request, Driver API, Enumeration and Helper like the CH34x. There are no functional changes, only code movement.

IngHK avatar Feb 23 '24 22:02 IngHK

The last commit improves the TU_LOGs. It standardizes the logs with a uniform beginning "[:dadr:itf_num] CHCh drivername ...". And it moves the logs from the driver to the common cdc section. Here an example output:

image

I think these are commits that need to be reviewed first. After the review and, if necessary, my follow-up work, I will push further commits

IngHK avatar Feb 23 '24 22:02 IngHK

@IngHK I appreciated your effor to break it out, but please push everything you think work best. Otherwise this make take several months to complete this whole process. I would like to merge portion of code once it is reviewed, and I may only have time to review this 1 or 2 times a month or so. Last time, I could focus on the PR since I need to get ch34x driver running for another paid works.

hathach avatar Feb 24 '24 10:02 hathach

@hathach OK, no problem, we'll do it the way that suits you best. Now I've pushed everything. I'm currently writing a small test suite to do the tests with hardware.

IngHK avatar Feb 24 '24 12:02 IngHK

I always see the IAR build fail, but with no relation to CDCh. Is it OK?

IngHK avatar Feb 24 '24 13:02 IngHK

thank you very much, I wil review this whenever I could.

hathach avatar Feb 28 '24 08:02 hathach

If it's easier for you than one huge PR, then I can split it up into smaller PRs that only contain individual and self-contained feature changes

IngHK avatar Mar 14 '24 12:03 IngHK

OK. I finished work for now. It's ready for review and merge

IngHK avatar Apr 04 '24 12:04 IngHK

thank you, please give me a bit of time to review.

hathach avatar Apr 08 '24 04:04 hathach