Add a new function usbd_abort_default_pipe() that aborts any transfers

on the default pipe. This is helpful in device detach routines to
stop any active control transfers.
This commit is contained in:
iedowse 2005-02-14 01:51:51 +00:00
parent ad55d8b5d0
commit 0f68b77a1a
2 changed files with 7 additions and 0 deletions

View File

@ -556,6 +556,12 @@ usbd_abort_pipe(usbd_pipe_handle pipe)
return (err);
}
usbd_status
usbd_abort_default_pipe(usbd_device_handle dev)
{
return (usbd_abort_pipe(dev->default_pipe));
}
usbd_status
usbd_clear_endpoint_stall(usbd_pipe_handle pipe)
{

View File

@ -110,6 +110,7 @@ void usbd_get_xfer_status(usbd_xfer_handle, usbd_private_handle *,
usb_endpoint_descriptor_t *usbd_interface2endpoint_descriptor
(usbd_interface_handle, u_int8_t);
usbd_status usbd_abort_pipe(usbd_pipe_handle);
usbd_status usbd_abort_default_pipe(usbd_device_handle);
usbd_status usbd_clear_endpoint_stall(usbd_pipe_handle);
usbd_status usbd_clear_endpoint_stall_async(usbd_pipe_handle);
void usbd_clear_endpoint_toggle(usbd_pipe_handle);