2.2.4.21 USB_DEVICE_EndpointStall Function

C

void USB_DEVICE_EndpointStall(
    USB_DEVICE_HANDLE usbDeviceHandle, 
    USB_ENDPOINT_ADDRESS endpoint
);

Summary

This function stalls an endpoint in the specified direction.

Precondition

Client handle should be valid.

Parameters

Parameters Description
usbDeviceHandle USB device handle returned by USB_DEVICE_Open
endpoint Specifies the endpoint and direction

Returns

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);

Remarks

None.