Remove the CFG_TUSB_RHPORTx_MODE fallback and tusb_init(void); rename TUP_RHPORT_HIGHSPEED
Maintainers usually reply within 1 day
@anirudh12032008 is already working on this.
Since Nov 14, 2026.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Start with the compatibility definitions in src/tusb_option.h and the deprecated initializer in src/tusb.h and src/tusb.c; review the cited changelog entries and the deferred issue #3779 for migration context. Then inspect the listed RT-Thread and unit-test configuration and call sites, the FT9xx comment, and unit-test build definitions. Done means removing or replacing the fallbacks and initializer, migrating in-tree users, renaming the high-speed defaults while preserving the SuperSpeed rule, and documenting the breaking change; first survey out-of-tree users.
Written by the indexing model from the issue text.
Description
Deferred from #3779. CFG_TUSB_RHPORT0_MODE / CFG_TUSB_RHPORT1_MODE were superseded in 0.14.0 by CFG_TUD_ENABLED / CFG_TUH_ENABLED and CFG_TUD_MAX_SPEED / CFG_TUH_MAX_SPEED (docs/changelog/0.14.0.md:19), and tusb_init(void) was deprecated in 0.18.0 (docs/changelog/0.18.0.md:16). Both are still supported as fallbacks.
Scope
- Remove the
CFG_TUSB_RHPORTx_MODEfallback insrc/tusb_option.h:489-506(device) and:531-548(host):TUD_RHPORT_MODE,TUH_RHPORT_MODE, and theCFG_TUD_ENABLED/CFG_TUD_MAX_SPEED/CFG_TUH_ENABLED/CFG_TUH_MAX_SPEEDdefaults derived from them. tusb_init(void): its rhport comes only fromTUD_OPT_RHPORT/TUH_OPT_RHPORT, which onlyCFG_TUSB_RHPORTx_MODEdefines (src/tusb.h:143-146,src/tusb.c:66-86). Decide whether to remove it (calls fail at compile time with a pointer totusb_init(rhport, &init)) or give it another rhport source.- Migrate the in-tree users:
lib/rt-thread/tusb_config.h:90-93, 156-157setsCFG_TUSB_RHPORT0/1_MODE;lib/rt-thread/tusb_rt_thread_port.c:61callstusb_init().test/unit-test/test/support/tusb_config.h.- Comment in
src/portable/bridgetek/ft9xx/dcd_ft9xx.c:305.
- Rename the high-speed port default the way #3779 renamed the SuperSpeed one (
TUP_RHPORT_SUPERSPEED->CFG_TUSB_SUPER_SPEED_DEFAULT, resolved to the overridableCFG_TUSB_SUPER_SPEED):TUP_RHPORT_HIGHSPEED->CFG_TUSB_HIGH_SPEED_DEFAULT/CFG_TUSB_HIGH_SPEED, shared byTUD_OPT_HIGH_SPEEDandTUH_OPT_HIGH_SPEED(src/tusb_option.h:515, 555), including the unit-test definitions (test/unit-test/project.yml:158,test/unit-test/CMakeLists.txt:160). Keep the SuperSpeed-implies-HighSpeed rule ofTUD_OPT_HIGH_SPEED. - Changelog entry: breaking change for applications still using
CFG_TUSB_RHPORTx_MODEortusb_init(void).
Why deferred
It is a breaking change for every application on the old configuration and unrelated to the SuperSpeed ports in #3779. Out-of-tree users (Arduino, ESP-IDF components, vendor SDKs) are not surveyed yet.
- Dominant language
- C
- Stars
- 7.3k
- Forks
- 1.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 67
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hathach/tinyusb
-
follow-up Port WCH USBFS Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
follow-up Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
hil-contract: a background hil_remote.py launch is killed at the Bash default 10 min timeoutPossibly taken @hathach claimed this 16 days ago. Openfollow-up Prio 📌
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
ch32v30x: debug UART loses queued bytes when its TX ring fillsPossibly taken @hathach claimed this 16 days ago. Openfollow-up Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
-
Missing slice offset check in jvp_equal fast path corrupts slice comparison and aborts delpathsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
area9innovation/flow9#1805 ·
Maintainers usually reply within 3 days
-
AI:Robustness triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
open5gs/open5gs#5246 · 1 comment ·
Maintainers usually reply within 1 day