Remove the CFG_TUSB_RHPORTx_MODE fallback and tusb_init(void); rename TUP_RHPORT_HIGHSPEED

Aperta
#4,501 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@anirudh12032008 ci sta già lavorando.

Dal 14/11/2026.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c
Ambito
embedded-iot

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

follow-up Prio 📌

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_MODE fallback in src/tusb_option.h:489-506 (device) and :531-548 (host): TUD_RHPORT_MODE, TUH_RHPORT_MODE, and the CFG_TUD_ENABLED / CFG_TUD_MAX_SPEED / CFG_TUH_ENABLED / CFG_TUH_MAX_SPEED defaults derived from them.
  • tusb_init(void): its rhport comes only from TUD_OPT_RHPORT / TUH_OPT_RHPORT, which only CFG_TUSB_RHPORTx_MODE defines (src/tusb.h:143-146, src/tusb.c:66-86). Decide whether to remove it (calls fail at compile time with a pointer to tusb_init(rhport, &init)) or give it another rhport source.
  • Migrate the in-tree users:
    • lib/rt-thread/tusb_config.h:90-93, 156-157 sets CFG_TUSB_RHPORT0/1_MODE; lib/rt-thread/tusb_rt_thread_port.c:61 calls tusb_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 overridable CFG_TUSB_SUPER_SPEED): TUP_RHPORT_HIGHSPEED -> CFG_TUSB_HIGH_SPEED_DEFAULT / CFG_TUSB_HIGH_SPEED, shared by TUD_OPT_HIGH_SPEED and TUH_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 of TUD_OPT_HIGH_SPEED.
  • Changelog entry: breaking change for applications still using CFG_TUSB_RHPORTx_MODE or tusb_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.

Lingua principale
C
Stelle
7.3k
Fork
1.6k
Merge medio
1g 19h
PR unite (30g)
67

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hathach/tinyusb

Tutte le issue di hathach/tinyusb

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.