USB Libraries Help > USB Device Libraries > USB Device Layer Library > Library Interface > e) Endpoint Management Functions > USB_DEVICE_EndpointStallClear Function
MPLAB Harmony USB Stack
USB_DEVICE_EndpointStallClear Function

This function clear the stall on an endpoint in the specified direction.

C
void USB_DEVICE_EndpointStallClear(
    USB_DEVICE_HANDLE usbDeviceHandle, 
    USB_ENDPOINT_ADDRESS endpoint
);
Preconditions

Client handle should be valid.

Parameters
Parameters 
Description 
usbDeviceHandle 
USB device handle returned by USB_DEVICE_Open(). 
endpoint 
Specifies the endpoint and direction. 
Returns

None.

Remarks

None.

Example
// This code example shows how to clear a stall on an
// endpoint. In this case, the stall on endpoint 1 IN direction is
// cleared.

USB_ENDPOINT_ADDRESS ep;

ep = USB_ENDPOINT_AND_DIRECTION(USB_DATA_DIRECTION_DEVICE_TO_HOST, 1);

USB_DEVICE_EndpointStallClear(usbDeviceHandle, ep);