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

This function stalls an endpoint in the specified direction.

C
void USB_DEVICE_EndpointStall(
    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

The application may typically, not find the need to stall an endpoint. Stalling an endpoint erroneously could potentially make the device non-compliant.

Example
// This code example shows how to stall an endpoint. In
// this case, endpoint 1 IN direction is stalled.

USB_ENDPOINT_ADDRESS ep;

ep = 0x1|USB_EP_DIRECTION_IN;

USB_DEVICE_EndpointStall(usbDeviceHandle, ep);