Skip to content

Conversation

@sakumisu
Copy link
Contributor

@sakumisu sakumisu commented Aug 8, 2025

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

[

为什么提交这份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
  • 如果是新增bsp, 已经添加ci检查到.github/workflows/bsp_buildings.yml 详细请参考链接BSP自查

Signed-off-by: sakumisu <1203593632@qq.com>
@github-actions
Copy link

github-actions bot commented Aug 8, 2025

📌 Code Review Assignment

🏷️ Tag: components

Reviewers: @Maihuanyi

Changed Files (Click to expand)
  • components/drivers/usb/cherryusb/Kconfig.rttpkg
  • components/drivers/usb/cherryusb/README_zh.md
  • components/drivers/usb/cherryusb/SConscript
  • components/drivers/usb/cherryusb/VERSION
  • components/drivers/usb/cherryusb/cherryusb_config_template.h
  • components/drivers/usb/cherryusb/class/cdc/usbh_cdc_ecm.c
  • components/drivers/usb/cherryusb/class/cdc/usbh_cdc_ncm.c
  • components/drivers/usb/cherryusb/class/hub/usbh_hub.c
  • components/drivers/usb/cherryusb/class/msc/usbd_msc.c
  • components/drivers/usb/cherryusb/class/msc/usbh_msc.c
  • components/drivers/usb/cherryusb/class/mtp/usb_mtp.h
  • components/drivers/usb/cherryusb/class/vendor/net/usbh_rtl8152.c
  • components/drivers/usb/cherryusb/class/wireless/usbh_rndis.c
  • components/drivers/usb/cherryusb/common/usb_errno.h
  • components/drivers/usb/cherryusb/common/usb_hc.h
  • components/drivers/usb/cherryusb/common/usb_util.h
  • components/drivers/usb/cherryusb/common/usb_version.h
  • components/drivers/usb/cherryusb/core/usbd_core.c
  • components/drivers/usb/cherryusb/core/usbh_core.c
  • components/drivers/usb/cherryusb/core/usbh_core.h
  • components/drivers/usb/cherryusb/demo/video_audiov1_hid_template.c
  • components/drivers/usb/cherryusb/demo/video_static_h264_template.c
  • components/drivers/usb/cherryusb/demo/video_static_mjpeg_template.c
  • components/drivers/usb/cherryusb/demo/video_static_yuyv_template.c
  • components/drivers/usb/cherryusb/idf_component.yml
  • components/drivers/usb/cherryusb/platform/rtthread/usb_check.c
  • components/drivers/usb/cherryusb/platform/rtthread/usbd_serial.c
  • components/drivers/usb/cherryusb/platform/rtthread/usbh_serial.c
  • components/drivers/usb/cherryusb/port/chipidea/usb_dc_chipidea.c
  • components/drivers/usb/cherryusb/port/dwc2/README.md

📊 Current Review Status (Last Updated: 2025-08-08 11:10 CST)


📝 Review Instructions

  1. 维护者可以通过单击此处来刷新审查状态: 🔄 刷新状态
    Maintainers can refresh the review status by clicking here: 🔄 Refresh Status

  2. 确认审核通过后评论 LGTM/lgtm
    Comment LGTM/lgtm after confirming approval

  3. PR合并前需至少一位维护者确认
    PR must be confirmed by at least one maintainer before merging

ℹ️ 刷新CI状态操作需要具备仓库写入权限。
ℹ️ Refresh CI status operation requires repository Write permission.

@Rbb666 Rbb666 requested a review from Copilot August 8, 2025 06:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates CherryUSB from version 1.5.1 to 1.5.2, bringing configuration normalization, bug fixes, and enhanced functionality across multiple USB controllers including DWC2, MUSB, EHCI, and others.

Key changes include:

  • Configuration constant renaming from CONFIG_USBHOST_PIPE_NUM/CONFIG_USBDEV_EP_NUM to specific controller constants
  • Bug fixes for memory management and URB handling
  • Performance optimizations and new platform support

Reviewed Changes

Copilot reviewed 52 out of 53 changed files in this pull request and generated no comments.

Show a summary per file
File Description
port/rp2040/usb_hc_rp2040.c Updates pipe configuration constants and improves URB cleanup
port/rp2040/usb_dc_rp2040.c Replaces generic endpoint constants with USB-specific ones
port/musb/usb_hc_musb.c Extensive MUSB controller updates with register access improvements
port/dwc2/usb_hc_dwc2.c DWC2 host controller optimizations and bug fixes
port/ehci/usb_hc_ehci.c EHCI controller memory management improvements
common/usb_version.h Version bump to v1.5.2
Comments suppressed due to low confidence (2)

components/drivers/usb/cherryusb/port/musb/usb_hc_musb.c:494

  • The function musb_pipe_alloc is missing the bus parameter that is used within the function body. The function signature should include struct usbh_bus *bus parameter.
static int musb_pipe_alloc(void)

components/drivers/usb/cherryusb/port/dwc2/usb_hc_dwc2.c:1353

  • The magic number 200000 should be defined as a named constant to improve code readability and maintainability.
                    dwc2_urb_waitup(urb);

@Rbb666 Rbb666 merged commit 3849966 into RT-Thread:master Aug 8, 2025
62 checks passed
@Rbb666 Rbb666 added this to the v5.2.2 milestone Sep 23, 2025
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.

2 participants