diff options
| author | Ha Thach <[email protected]> | 2024-08-19 18:22:13 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-08-19 18:22:13 +0700 |
| commit | ca3925a4c5b8958ec6f49818e78ccf35aba59247 (patch) | |
| tree | 5ff87db052ccfb1a049a4363e48d70b180cee973 /src/device/dcd.h | |
| parent | b8d3c0c4a8e005bcfcc4ed04556e6da54f235ccc (diff) | |
| parent | 635bdc1fcea1d4d9972d4c9960a32250b0245186 (diff) | |
Merge pull request #2708 from BrentK-ADI/max32_port
Add port for Analog Devices MAX32 MCUs
Diffstat (limited to 'src/device/dcd.h')
| -rw-r--r-- | src/device/dcd.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/device/dcd.h b/src/device/dcd.h index 41e0fbee3..d1d4e4897 100644 --- a/src/device/dcd.h +++ b/src/device/dcd.h @@ -157,10 +157,6 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc // required for multiple configuration support. void dcd_edpt_close_all (uint8_t rhport); -// Close an endpoint. -// Since it is weak, caller must TU_ASSERT this function's existence before calling it. -void dcd_edpt_close (uint8_t rhport, uint8_t ep_addr) TU_ATTR_WEAK; - // Submit a transfer, When complete dcd_event_xfer_complete() is invoked to notify the stack bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes); @@ -175,12 +171,19 @@ 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 // Allocate packet buffer used by ISO endpoints // Some MCU need manual packet buffer allocation, we allocate the largest size to avoid clustering -TU_ATTR_WEAK bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet_size); +bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet_size); // Configure and enable an ISO endpoint according to descriptor -TU_ATTR_WEAK bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * desc_ep); +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) TU_ATTR_WEAK; + +#endif //--------------------------------------------------------------------+ // Event API (implemented by stack) |
