diff options
| author | hathach <[email protected]> | 2025-03-25 16:15:58 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-03-25 16:15:58 +0700 |
| commit | 65e01fff2e7ab5302baa45bdd81a1d774e269452 (patch) | |
| tree | 409df9c6ec21e8b07bec56d2135e3e8f38bd2286 /src/portable/raspberrypi | |
| parent | b99b811308114d07cbba0d432abc185c05896ec3 (diff) | |
add tuh_edpt_close() API, it will abort any pending transfer
implement hcd_edpt_close() for pio-usb and max3421e, also move max3421e api into its own header.
Diffstat (limited to 'src/portable/raspberrypi')
| -rw-r--r-- | src/portable/raspberrypi/pio_usb/hcd_pio_usb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c b/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c index 6422afff1..225a44dcf 100644 --- a/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c +++ b/src/portable/raspberrypi/pio_usb/hcd_pio_usb.c @@ -122,6 +122,11 @@ bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const return pio_usb_host_endpoint_open(pio_rhport, dev_addr, (uint8_t const *) desc_ep, need_pre); } +bool hcd_edpt_close(uint8_t rhport, uint8_t daddr, uint8_t ep_addr) { + uint8_t const pio_rhport = RHPORT_PIO(rhport); + return pio_usb_host_endpoint_close(pio_rhport, daddr, ep_addr); +} + bool hcd_edpt_xfer(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr, uint8_t *buffer, uint16_t buflen) { uint8_t const pio_rhport = RHPORT_PIO(rhport); return pio_usb_host_endpoint_transfer(pio_rhport, dev_addr, ep_addr, buffer, buflen); |
