diff options
| author | Ha Thach <[email protected]> | 2020-08-01 12:11:08 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-08-01 12:11:08 +0700 |
| commit | 16fe590b71a9a5449d50aba7210e305595b15681 (patch) | |
| tree | 5cc6360f53c01f01ee213a7b24cc951a0321ddf6 /src | |
| parent | 22100b252fc2eb8f51ed407949645653c4880fd9 (diff) | |
| parent | c3b0389f10188e016c0cd0bb74638ecfb0eae8ea (diff) | |
Merge pull request #475 from kasjer/kasjer/fix-synopsys-endpoint-constraint-check
Fix synopsys size check for ISO endpoint
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/st/synopsys/dcd_synopsys.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c index 03c33c598..f4430f582 100644 --- a/src/portable/st/synopsys/dcd_synopsys.c +++ b/src/portable/st/synopsys/dcd_synopsys.c @@ -514,8 +514,14 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt) TU_ASSERT(epnum < EP_MAX); - // TODO ISO endpoint can be up to 1024 bytes - TU_ASSERT(desc_edpt->wMaxPacketSize.size <= (get_speed(rhport) == TUSB_SPEED_HIGH ? 512 : 64)); + if (desc_edpt->bmAttributes.xfer == TUSB_XFER_ISOCHRONOUS) + { + TU_ASSERT(desc_edpt->wMaxPacketSize.size <= (get_speed(rhport) == TUSB_SPEED_HIGH ? 1024 : 1023)); + } + else + { + TU_ASSERT(desc_edpt->wMaxPacketSize.size <= (get_speed(rhport) == TUSB_SPEED_HIGH ? 512 : 64)); + } xfer_ctl_t * xfer = XFER_CTL_BASE(epnum, dir); xfer->max_size = desc_edpt->wMaxPacketSize.size; |
