usb: device: Add transfer cancel helper

Add usb_cancel_transfers() helper to cancel all ongoing transfers.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2019-05-16 10:57:03 +03:00 committed by Carles Cufí
commit bf76b2acc3
2 changed files with 23 additions and 0 deletions

View file

@ -418,6 +418,11 @@ int usb_transfer_sync(u8_t ep, u8_t *data, size_t dlen, unsigned int flags);
*/
void usb_cancel_transfer(u8_t ep);
/**
* @brief Cancel all ongoing transfers
*/
void usb_cancel_transfers(void);
/**
* @brief Check that transfer is ongoing for the endpoint
*