diff options
| author | pschatzmann <[email protected]> | 2025-01-04 22:20:46 +0100 |
|---|---|---|
| committer | Mengsk <[email protected]> | 2025-01-15 10:18:16 +0100 |
| commit | b91d5ebb4509d02d108e249197884913698aac1c (patch) | |
| tree | ba79354b7a49b123774833a80bb4425c3129bb66 /src | |
| parent | 2495563600f1cd2220d740895fad701dd48f1fb6 (diff) | |
rp2040 correct dcd_edpt_iso_activate
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/raspberrypi/rp2040/dcd_rp2040.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/portable/raspberrypi/rp2040/dcd_rp2040.c b/src/portable/raspberrypi/rp2040/dcd_rp2040.c index af08b549d..b91dd38d5 100644 --- a/src/portable/raspberrypi/rp2040/dcd_rp2040.c +++ b/src/portable/raspberrypi/rp2040/dcd_rp2040.c @@ -496,6 +496,12 @@ bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) { (void) rhport; const uint8_t ep_addr = ep_desc->bEndpointAddress; + + // init w/o allocate + const uint16_t mps = ep_desc->wMaxPacketSize; + uint16_t size = (uint16_t)tu_div_ceil(mps, 64) * 64u; + hw_endpoint_init(ep_addr, size, TUSB_XFER_ISOCHRONOUS); + // Fill in endpoint control register with buffer offset struct hw_endpoint* ep = hw_endpoint_get_by_addr(ep_addr); TU_ASSERT(ep->hw_data_buf != NULL); // must be inited and buffer allocated |
