Skip to content

Commit 491fe4c

Browse files
committed
rp2040 correct dcd_edpt_iso_activate
1 parent 2495563 commit 491fe4c

File tree

6 files changed

+11
-0
lines changed

6 files changed

+11
-0
lines changed

hw/mcu/st/cmsis_device_f0

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 2fc25ee22264bc27034358be0bd400b893ef837e

hw/mcu/st/cmsis_device_f3

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 5e4ee5ed7a7b6c85176bb70a9fd3c72d6eb99f1b

hw/mcu/st/cmsis_device_g0

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 3a23e1224417f3f2d00300ecd620495e363f2094

lib/FreeRTOS-Kernel

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit cc0e0707c0c748713485b870bb980852b210877f

lib/lwip

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 159e31b689577dbf69cf0683bbaffbd71fa5ee10

src/portable/raspberrypi/rp2040/dcd_rp2040.c

+6
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,12 @@ bool dcd_edpt_iso_alloc(uint8_t rhport, uint8_t ep_addr, uint16_t largest_packet
496496
bool dcd_edpt_iso_activate(uint8_t rhport, tusb_desc_endpoint_t const * ep_desc) {
497497
(void) rhport;
498498
const uint8_t ep_addr = ep_desc->bEndpointAddress;
499+
500+
// init w/o allocate
501+
const uint16_t mps = ep_desc->wMaxPacketSize;
502+
uint16_t size = (uint16_t)tu_div_ceil(mps, 64) * 64u;
503+
hw_endpoint_init(ep_addr, size, TUSB_XFER_ISOCHRONOUS);
504+
499505
// Fill in endpoint control register with buffer offset
500506
struct hw_endpoint* ep = hw_endpoint_get_by_addr(ep_addr);
501507
TU_ASSERT(ep->hw_data_buf != NULL); // must be inited and buffer allocated

0 commit comments

Comments
 (0)