diff options
| author | Nathan Conrad <[email protected]> | 2020-04-13 09:25:16 -0400 |
|---|---|---|
| committer | Nathan Conrad <[email protected]> | 2020-04-13 09:51:46 -0400 |
| commit | f8e7487355c1d48517211a2316fbbc8566a1532d (patch) | |
| tree | a5617b08460972c7ad6055c95548ff0b2f77a6ba /src/device | |
| parent | 0eeaccaf46c28444cc0830895559652cf5638c60 (diff) | |
edpt_close: Updated based on feedback.
Diffstat (limited to 'src/device')
| -rw-r--r-- | src/device/usbd.c | 10 | ||||
| -rw-r--r-- | src/device/usbd.h | 2 | ||||
| -rw-r--r-- | src/device/usbd_pvt.h | 1 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/device/usbd.c b/src/device/usbd.c index e46532567..71f5454ee 100644 --- a/src/device/usbd.c +++ b/src/device/usbd.c @@ -1044,6 +1044,8 @@ bool usbd_edpt_stalled(uint8_t rhport, uint8_t ep_addr) /** * Remove queued xfer complete messages from event queue, * for a particular ep. + * + * Must be called with interrupts enabled. */ static void usbd_abort_transfers(uint8_t rhport, uint8_t ep_addr) { @@ -1077,13 +1079,13 @@ static void usbd_abort_transfers(uint8_t rhport, uint8_t ep_addr) } /** - * tud_edpt_close will disable an endpoint, and clear all pending transfers + * usbd_edpt_close will disable an endpoint, and clear all pending transfers * through the particular endpoint. * - * It must be called from the usb task (i.e. from the control request - * handler while handling SET_ALTERNATE). + * It must be called from the usb task (e.g. from the control request + * handler while handling SET_ALTERNATE), with interrupts enabled. */ -void tud_edpt_close(uint8_t rhport, uint8_t ep_addr) +void usbd_edpt_close(uint8_t rhport, uint8_t ep_addr) { TU_ASSERT(dcd_edpt_close, /**/); diff --git a/src/device/usbd.h b/src/device/usbd.h index 2447c2082..817af20e3 100644 --- a/src/device/usbd.h +++ b/src/device/usbd.h @@ -79,8 +79,6 @@ static inline bool tud_connect(void) return true; } -void tud_edpt_close(uint8_t rhport, uint8_t ep_addr); - // Carry out Data and Status stage of control transfer // - If len = 0, it is equivalent to sending status only // - If len > wLength : it will be truncated diff --git a/src/device/usbd_pvt.h b/src/device/usbd_pvt.h index b9947044b..26b9700e8 100644 --- a/src/device/usbd_pvt.h +++ b/src/device/usbd_pvt.h @@ -38,6 +38,7 @@ //--------------------------------------------------------------------+ //bool usbd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * p_endpoint_desc); +void usbd_edpt_close(uint8_t rhport, uint8_t ep_addr); // Submit a usb transfer bool usbd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes); |
