diff options
| author | hathach <[email protected]> | 2020-09-09 15:48:11 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-09-09 15:48:11 +0700 |
| commit | 8b9893cadab88fa4abd17d5b9856e0d08ef03796 (patch) | |
| tree | 1cb481b7e962094687566dc8143bed79d6c00072 /src/device/usbd_pvt.h | |
| parent | 10d5dac9137adfd6c14d96e1079f08447eacd9d8 (diff) | |
introduce optional usbd_edpt_claim, usbd_edpt_release which can be used to gain exclusive access to usbd_edpt_xfer
Diffstat (limited to 'src/device/usbd_pvt.h')
| -rw-r--r-- | src/device/usbd_pvt.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/device/usbd_pvt.h b/src/device/usbd_pvt.h index a5d223329..5fa9a72a5 100644 --- a/src/device/usbd_pvt.h +++ b/src/device/usbd_pvt.h @@ -70,6 +70,12 @@ void usbd_edpt_close(uint8_t rhport, uint8_t ep_addr); // Submit a usb transfer bool usbd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t total_bytes); +// Claim an endpoint before submitting a transfer +bool usbd_edpt_claim(uint8_t rhport, uint8_t ep_addr); + +// Release an endpoint without submitting a transfer +bool usbd_edpt_release(uint8_t rhport, uint8_t ep_addr); + // Check if endpoint transferring is complete bool usbd_edpt_busy(uint8_t rhport, uint8_t ep_addr); |
