Skip to content

refactor(usb): dynamic endpoint descriptor generation#5405

Open
digitalentity wants to merge 2 commits into
tinygo-org:devfrom
helvionics:de_usb_endpoint_remap
Open

refactor(usb): dynamic endpoint descriptor generation#5405
digitalentity wants to merge 2 commits into
tinygo-org:devfrom
helvionics:de_usb_endpoint_remap

Conversation

@digitalentity
Copy link
Copy Markdown

Replace static endpoint variables with EndpointIN and EndpointOUT functions.
Change the CDC, CDCHID and CDCMSC descriptors to fit into 4 endpoints.
This is a pre-requisite for supporting USB on STM32 which has only 4 EPs in hardware.

@digitalentity
Copy link
Copy Markdown
Author

@deadprogram please have a look

Replace static endpoint variables with EndpointIN and EndpointOUT
functions. Allows flexible endpoint remapping across USB configs.
@deadprogram
Copy link
Copy Markdown
Member

@digitalentity please note test failure.

@deadprogram
Copy link
Copy Markdown
Member

@digitalentity that was fast! 😸

@digitalentity
Copy link
Copy Markdown
Author

@deadprogram @sago35 I've tested this on a tiny2350, seems to work.

@deadprogram
Copy link
Copy Markdown
Member

Can some others please test out on various USB devices with your own projects e.g. TinyGo Keeb etc? I just want to make sure this does not cause any unexpected issues, or at least that people know about it.

@sago35
Copy link
Copy Markdown
Member

sago35 commented May 29, 2026

I’ll check on Monday or Tuesday.

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