diff options
| author | Charlie Birks <[email protected]> | 2022-02-23 12:25:01 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-02-23 12:25:01 +0000 |
| commit | c0a65ba0f62287cb7b5091a263656fdb26a140e9 (patch) | |
| tree | 3af5ef5abf0d6770d19c22679295b1703924e056 /src | |
| parent | fa895ed3dc46d5aa5e11b19ff07beb6fcfc62655 (diff) | |
Support interrupt OUT in RP2040 HCD
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/raspberrypi/rp2040/hcd_rp2040.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/portable/raspberrypi/rp2040/hcd_rp2040.c b/src/portable/raspberrypi/rp2040/hcd_rp2040.c index 3e80dd872..4ffad75a0 100644 --- a/src/portable/raspberrypi/rp2040/hcd_rp2040.c +++ b/src/portable/raspberrypi/rp2040/hcd_rp2040.c @@ -328,9 +328,11 @@ static void _hw_endpoint_init(struct hw_endpoint *ep, uint8_t dev_addr, uint8_t // endpoint number / direction // preamble uint32_t reg = dev_addr | (num << USB_ADDR_ENDP1_ENDPOINT_LSB); - // Assert the interrupt endpoint is IN_TO_HOST - // TODO Interrupt can also be OUT - assert(dir == TUSB_DIR_IN); + + if (dir == TUSB_DIR_OUT) + { + reg |= USB_ADDR_ENDP1_INTEP_DIR_BITS; + } if (need_pre(dev_addr)) { |
