Skip to content

Commit c0a65ba

Browse files
authored
Support interrupt OUT in RP2040 HCD
1 parent fa895ed commit c0a65ba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/portable/raspberrypi/rp2040/hcd_rp2040.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,11 @@ static void _hw_endpoint_init(struct hw_endpoint *ep, uint8_t dev_addr, uint8_t
328328
// endpoint number / direction
329329
// preamble
330330
uint32_t reg = dev_addr | (num << USB_ADDR_ENDP1_ENDPOINT_LSB);
331-
// Assert the interrupt endpoint is IN_TO_HOST
332-
// TODO Interrupt can also be OUT
333-
assert(dir == TUSB_DIR_IN);
331+
332+
if (dir == TUSB_DIR_OUT)
333+
{
334+
reg |= USB_ADDR_ENDP1_INTEP_DIR_BITS;
335+
}
334336

335337
if (need_pre(dev_addr))
336338
{

0 commit comments

Comments
 (0)