summaryrefslogtreecommitdiff
path: root/src/device
diff options
context:
space:
mode:
Diffstat (limited to 'src/device')
-rw-r--r--src/device/dcd.h1
-rw-r--r--src/device/usbd.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/device/dcd.h b/src/device/dcd.h
index 8bfad9b72..66767c1fe 100644
--- a/src/device/dcd.h
+++ b/src/device/dcd.h
@@ -152,6 +152,7 @@ bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff,
void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr);
// clear stall, data toggle is also reset to DATA0
+// 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);
//--------------------------------------------------------------------+
diff --git a/src/device/usbd.c b/src/device/usbd.c
index e8a50352c..8b4f4e7e3 100644
--- a/src/device/usbd.c
+++ b/src/device/usbd.c
@@ -1220,6 +1220,9 @@ bool usbd_edpt_claim(uint8_t rhport, uint8_t ep_addr)
{
(void) rhport;
+ // TODO add this check later, also make sure we don't starve an out endpoint while suspending
+ // TU_VERIFY(tud_ready());
+
uint8_t const epnum = tu_edpt_number(ep_addr);
uint8_t const dir = tu_edpt_dir(ep_addr);
@@ -1273,6 +1276,9 @@ bool usbd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t
uint8_t const epnum = tu_edpt_number(ep_addr);
uint8_t const dir = tu_edpt_dir(ep_addr);
+ // TODO skip ready() check for now since enumeration also use this API
+ // TU_VERIFY(tud_ready());
+
TU_LOG2(" Queue EP %02X with %u bytes ...\r\n", ep_addr, total_bytes);
// Attempt to transfer on a busy endpoint, sound like an race condition !