Skip to content

Commit 2ae6a4d

Browse files
authored
Merge pull request #1755 from rppicomidi/fix_1721
Fix RP2040 Issue 1721
2 parents ff26714 + 9825fbe commit 2ae6a4d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/portable/raspberrypi/rp2040/rp2040_usb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ static void __tusb_irq_path_func(_hw_endpoint_start_next_buffer)(struct hw_endpo
155155
// For now: skip double buffered for Device mode, OUT endpoint since
156156
// host could send < 64 bytes and cause short packet on buffer0
157157
// NOTE this could happen to Host mode IN endpoint
158-
bool const force_single = !(usb_hw->main_ctrl & USB_MAIN_CTRL_HOST_NDEVICE_BITS) && !tu_edpt_dir(ep->ep_addr);
158+
// Also, Host mode interrupt endpoint hardware is only single buffered
159+
bool const force_single = (!(usb_hw->main_ctrl & USB_MAIN_CTRL_HOST_NDEVICE_BITS) && !tu_edpt_dir(ep->ep_addr)) ||
160+
((usb_hw->main_ctrl & USB_MAIN_CTRL_HOST_NDEVICE_BITS) && tu_edpt_number(ep->ep_addr) != 0);
159161

160162
if(ep->remaining_len && !force_single)
161163
{

0 commit comments

Comments
 (0)