summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-11-17 23:34:04 +0700
committerGitHub <[email protected]>2025-11-17 23:34:04 +0700
commit66c84528f67c0eedc23d25221500d820e702d93f (patch)
treef09f88b100d1e65b56d76a3715ce9d6aeada8f87 /src/device
parent20c36442246279d884a6b61066fda6778c1c06ee (diff)
parent117350222301bc0c9f70104e8a1c4080c34810f2 (diff)
Merge pull request #3345 from hathach/update-iso-alloc
make dcd_edpt_iso_alloc/activate as default API for ISO endpoint
Diffstat (limited to 'src/device')
-rw-r--r--src/device/dcd.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/device/dcd.h b/src/device/dcd.h
index 1b0289280..353f836ee 100644
--- a/src/device/dcd.h
+++ b/src/device/dcd.h
@@ -171,7 +171,12 @@ void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr);
// This API never calls with control endpoints, since it is auto cleared when receiving setup packet
void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr);
-#ifdef TUP_DCD_EDPT_ISO_ALLOC
+#ifdef TUP_DCD_EDPT_CLOSE_API
+// Close an endpoint.
+void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr);
+
+#else
+
// Allocate packet buffer used by ISO endpoints
// Some MCU need manual packet buffer allocation, we allocate the largest size to avoid clustering
bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet_size);
@@ -179,10 +184,6 @@ bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet
// Configure and enable an ISO endpoint according to descriptor
bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * desc_ep);
-#else
-// Close an endpoint.
-void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr);
-
#endif
//--------------------------------------------------------------------+