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(drivers/usb):replace rtt usb stack with cherryusb #8799

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sakumisu
Copy link

@sakumisu sakumisu commented Apr 15, 2024

拉取/合并请求描述:(PR description)

最终目的:使用 cherryusb 替换 rtthread 自带的 usb 协议栈。同步的当前主线 commit

替换流程:
1,将原有的 usb stack 移动到 components/legacy 目录下,用于使用 rtt usb stack的用户
2,增加 cherryusb 至 drivers/usb 目录
3,选择部分bsp 增加 cherryusb 适配(主要增加非 IP 级别的底层驱动和 usb 初始化),其中 usb_config.h 目前是放在bsp中,每个 bsp会单独管理 usb_config.h。
4,目前已经适配 bouffalolab(bl616), 其余 bsp待定(需要先确定前面三步是否合理)

image

为什么提交这份PR (why to submit this PR)

你的解决方案是什么 (what is your solution)

请提供验证的bsp和config (provide the config and bsp)

  • BSP:
  • .config:
  • action:

]

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification

@BernardXiong
Copy link
Member

目录结构上没问题,不过代码头的版权协议建议仔细捋捋

@sakumisu
Copy link
Author

目录结构上没问题,不过代码头的版权协议建议仔细捋捋

指的是文件里缺失license的地方吗

@BernardXiong
Copy link
Member

目录结构上没问题,不过代码头的版权协议建议仔细捋捋

指的是文件里缺失license的地方吗

是的,一些文件是没有版权信息的,这样容易引起纠纷

@mysterywolf mysterywolf marked this pull request as draft April 16, 2024 01:54
@sakumisu sakumisu force-pushed the rtt_cherryusb branch 4 times, most recently from ef4f51f to 82bafd2 Compare April 22, 2024 13:21
Copy link
Member

@BernardXiong BernardXiong left a comment

Choose a reason for hiding this comment

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

keep the old if as a package

components/drivers/usb/cherryusb/Kconfig Outdated Show resolved Hide resolved
components/drivers/usb/cherryusb/Kconfig Outdated Show resolved Hide resolved
@mysterywolf mysterywolf marked this pull request as ready for review April 23, 2024 02:39
@sakumisu sakumisu force-pushed the rtt_cherryusb branch 5 times, most recently from 280138f to 78f0002 Compare April 23, 2024 05:05
@yangpengya
Copy link
Contributor

能不能开放支持不带dma功能的ip做主机使用?

@sakumisu
Copy link
Author

能不能开放支持不带dma功能的ip做主机使用?

不带dma的ip,功能太弱,中断太频繁,处理太麻烦,很容易出问题,所以不考虑做,我只支持全功能的 IP,多谢

@sakumisu sakumisu force-pushed the rtt_cherryusb branch 2 times, most recently from f77c3b8 to 0a6f16f Compare May 12, 2024 12:52
@sakumisu sakumisu force-pushed the rtt_cherryusb branch 2 times, most recently from aef0f6d to 821f911 Compare May 24, 2024 14:52
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.

None yet

4 participants