diff options
| author | HiFiPhile <[email protected]> | 2025-04-18 11:25:59 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-04-18 11:25:59 +0200 |
| commit | ee1a5dbac00d324f976fd1639d228c7e33572237 (patch) | |
| tree | 1cb5019f7e72a252c1a3bb4d4a8d7e2ea3a5ed3a | |
| parent | 91163c92170740ab5d6e0b5b768e6f0c8856f86b (diff) | |
| parent | b6abc9022a4beae98cc206d8fbeefb4700deef2f (diff) | |
Merge pull request #3084 from joelpmichael/hcd-template-comments
note potential issues using ep_desc in hcd_edpt_open()
| -rw-r--r-- | src/portable/template/hcd_template.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/portable/template/hcd_template.c b/src/portable/template/hcd_template.c index 1202c4ef4..22ea22e63 100644 --- a/src/portable/template/hcd_template.c +++ b/src/portable/template/hcd_template.c @@ -106,6 +106,11 @@ void hcd_device_close(uint8_t rhport, uint8_t dev_addr) { // Open an endpoint bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const * ep_desc) { (void) rhport; (void) dev_addr; (void) ep_desc; + + // NOTE: ep_desc is allocated on the stack when called from usbh_edpt_control_open() + // You need to copy the data into a local variable who maintains the state of the endpoint and transfer. + // Check _hcd_data in hcd_dwc2.c for example. + return false; } |
