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

[osal]Add rt-thread script support. #2599

Merged
merged 2 commits into from
Apr 25, 2024
Merged

[osal]Add rt-thread script support. #2599

merged 2 commits into from
Apr 25, 2024

Conversation

Rbb666
Copy link
Contributor

@Rbb666 Rbb666 commented Apr 16, 2024

…ojects.

Describe the PR
Add rtthread script support to better integrate into rtthread projects.
Tinyusb will be added to the rtthread project in the form of a software package.

Additional context
If applicable, add any other context about the PR and/or screenshots here.

@Rbb666 Rbb666 changed the title [add]Add rtthread script support. [osal]Add rtthread script support. Apr 16, 2024
@Rbb666 Rbb666 changed the title [osal]Add rtthread script support. [osal]Add rt-thread script support. Apr 16, 2024
@HiFiPhile
Copy link
Collaborator

HiFiPhile commented Apr 16, 2024

Thanks for your PR but it's more like an example configuration which should be added to rt-thread instead of tinyusb.

With your macro it only make things more complicate, more conditions need to check and only CDC+MSC is supported, what if someone simply wants 2*CDC ? tusb_descriptor.c/.h should be application specifically written.

Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

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

src/ is for tinyusb stack code, lots of pr's files are framework glue codes and does not belong to src/ folder. If rtthread needs these glue code to run, you can put it into lib/ instead.

@Rbb666
Copy link
Contributor Author

Rbb666 commented Apr 17, 2024

感谢您的 PR,但它更像是一个示例配置,应该添加到 rt-thread 而不是 tinyusb。

使用您的宏只会使事情变得更加复杂,需要检查更多条件并且仅支持 CDC+MSC,如果有人只是想要 2*CDC 怎么办? 应专门编写申请。tusb_descriptor.c/.h

Hello, by doing this you can add the tinyusb repo as the rtthread package to the project. This form is similar to the LVGL project: https://github.com/lvgl/lvgl/tree/master/env_support/rt-thread

@Rbb666
Copy link
Contributor Author

Rbb666 commented Apr 17, 2024

src/ is for tinyusb stack code, lots of pr's files are framework glue codes and does not belong to src/ folder. If rtthread needs these glue code to run, you can put it into instead.lib/

OK,I'll modify it.

@Rbb666 Rbb666 force-pushed the rtthread branch 3 times, most recently from d34644f to 33dd98e Compare April 17, 2024 07:09
@Rbb666 Rbb666 requested a review from hathach April 17, 2024 07:09
@HiFiPhile
Copy link
Collaborator

HiFiPhile commented Apr 17, 2024

Hello, by doing this you can add the tinyusb repo as the rtthread package to the project. This form is similar to the LVGL project: https://github.com/lvgl/lvgl/tree/master/env_support/rt-thread

Tinyusb has much more configurations than LVGL, it's impossible to cover every use case in a single tusb_config.h and tusb_descriptor.c/.h. That's why every example has its own configurations.

For example if you compare tusb_descriptor.c from video_capture and usb_msc examples there is nearly nothing in common.

These files should be removed.

@Rbb666
Copy link
Contributor Author

Rbb666 commented Apr 18, 2024

Hello, by doing this you can add the tinyusb repo as the rtthread package to the project. This form is similar to the LVGL project: https://github.com/lvgl/lvgl/tree/master/env_support/rt-thread

Tinyusb has much more configurations than LVGL, it's impossible to cover every use case in a single tusb_config.h and tusb_descriptor.c/.h. That's why every example has its own configurations.

For example if you compare tusb_descriptor.c from video_capture and usb_msc examples there is nearly nothing in common.

These files should be removed.

It has been modified, please take a look again.

Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

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

I pushed a fix for pre-commmit. Look good, note that since I don't ( know how to) use rtthread yet, I won't be able to maintain the code, please submit PR to help keep it up to date.

@hathach hathach merged commit c237d18 into hathach:master Apr 25, 2024
69 checks passed
@Rbb666
Copy link
Contributor Author

Rbb666 commented Apr 25, 2024

我推送了 pre-commit 的修复程序。看起来不错,请注意,由于我还不知道如何使用 rtthread,我将无法维护代码,请提交 PR 以帮助使其保持最新状态。

No problem, I am an official member of rtthread and can help you maintain it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants