Skip to content

Conversation

@joelpmichael
Copy link
Contributor

Add a comment in hcd_edpt_open() to make new contributors aware that ep_desc is allocated from the stack when called from usbh_edpt_control_open(), so if any values from ep_desc are required (eg ep_desc->wMaxPacketSize) they must be copied.

See also #3083

@HiFiPhile
Copy link
Collaborator

Thank you for the note, I think it's more clear with something like HCD must maintain endpoint and transfer status locally (not a native English speaker)

Signed-off-by: HiFiPhile <admin@hifiphile.com>
…ents

Signed-off-by: HiFiPhile <admin@hifiphile.com>
@HiFiPhile HiFiPhile merged commit ee1a5db into hathach:master Apr 18, 2025
107 of 109 checks passed
@hathach
Copy link
Owner

hathach commented Apr 22, 2025

they must be copied, there is no requirement that is long-term memory, even with normal enumeration which usbh control memory is used temporarily for holding device configuration. But they can be wiped out and reused for other control transfer.

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