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

refactor(esp_tinyusb/cdc): Remove receive ring buffer #205

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

tore-espressif
Copy link
Collaborator

@tore-espressif tore-espressif commented Jul 12, 2023

Quality update for esp_tinyusb, focused mostly on CDC driver

  • CDC-ACM: Remove intermediate RX ringbuffer: Buffering is performed in TinyUSB; there is no reason for another buffer
  • CDC-ACM: Increase default FIFO size to 512 bytes
  • CDC-ACM: Fix Virtual File System binding
  • CDC-ACM: Added tests (not run in CI yet)

Tested with both 0.14 and 0.15 TinyUSB

TODO:

  • Requires fatfs and vfs components only if MSC or CDC+VFS is enabled

@github-actions
Copy link

github-actions bot commented Jul 12, 2023

Unit Test Results

  11 files  ±0    11 suites  ±0   15m 9s ⏱️ -2s
  27 tests ±0    27 ✔️ ±0  0 💤 ±0  0 ±0 
252 runs  ±0  252 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit cf51490. ± Comparison against base commit 3c52bba.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@roma-jam roma-jam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @tore-espressif well done!

I have left some comments, which are not critical at all. Just a few suggestions.
Also, I have tried to launch pytest for the tusb_device part and it seems that it is too difficult for me.
As far as I understand I do not need to devices here to test the logic, or do I?
Based on this, maybe it is a good idea to put somewhere the description how to launch a test locally.

What do you think? Or we have such a description and there is only me who doesn't know about that?

Otherwise, LGTM.

Copy link
Contributor

@esp-saurabhbansal esp-saurabhbansal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tore-espressif Please check few comments.

usb/esp_tinyusb/tusb_cdc_acm.c Outdated Show resolved Hide resolved
usb/esp_tinyusb/tusb_cdc_acm.c Show resolved Hide resolved
usb/esp_tinyusb/tusb_cdc_acm.c Show resolved Hide resolved
Copy link
Collaborator Author

@tore-espressif tore-espressif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the review @roma-jam @esp-saurabhbansal , I will update the code ASAP

usb/esp_tinyusb/tusb_cdc_acm.c Show resolved Hide resolved
usb/esp_tinyusb/tusb_cdc_acm.c Show resolved Hide resolved
usb/test_app/pytest_usb_host.py Outdated Show resolved Hide resolved
@tore-espressif tore-espressif force-pushed the feature/esp_tinyusb/optimize_cdc branch from b6a7395 to e22ec82 Compare July 27, 2023 08:46
@tore-espressif
Copy link
Collaborator Author

@esp-saurabhbansal @roma-jam Thank you very much for your reviews. I fixed all the issues. Moreover, I update CMake so we don't require unnecessary components, PTAL!

@tore-espressif tore-espressif force-pushed the feature/esp_tinyusb/optimize_cdc branch from e22ec82 to ce58750 Compare July 27, 2023 11:56
- CDC-ACM: Remove intermediate RX ringbuffer
- CDC-ACM: Increase default FIFO size to 512 bytes
- CDC-ACM: Fix Virtual File System binding
- CMake:   Remove unnecessary dependencies
@tore-espressif tore-espressif merged commit 7388928 into master Sep 4, 2023
63 checks passed
@mahavirj mahavirj deleted the feature/esp_tinyusb/optimize_cdc branch September 18, 2023 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants