summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-11-15 19:46:14 +0700
committerhathach <[email protected]>2025-11-17 12:09:30 +0700
commit6b28a4478c9f8fa3993d593360eb5574bbdeda22 (patch)
tree5a3b2566184aa29c7e4d8d923392cdf689cbae45 /src/device
parenta3a5a41be8e22f529a8941c107ec32d48faa6ff2 (diff)
make TUP_DCD_EDPT_ISO_ALLOC i.e dcd_edpt_iso_alloc()/dcd_edpt_iso_activate() as default driver implementation. dcd_edpt_close() is deprecated and will be removed from all driver in the future.
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
//--------------------------------------------------------------------+