Expand Minimize

WinUsb_ResetPipe function

The WinUsb_ResetPipe function resets the data toggle and clears the stall condition on a pipe.

Syntax


BOOL __stdcall WinUsb_ResetPipe(
  _In_  WINUSB_INTERFACE_HANDLE InterfaceHandle,
  _In_  UCHAR PipeID
);

Parameters

InterfaceHandle [in]

An opaque handle to the interface that contains the endpoint with which the pipe is associated.

To reset a pipe associated with an endpoint in the first interface, use the handle returned by WinUsb_Initialize. For all other interfaces, use the handle to the target interface, retrieved by WinUsb_GetAssociatedInterface.

PipeID [in]

The identifier (ID) of the control pipe. The PipeID parameter is an 8-bit value that consists in a 7-bit address and a direction bit. This parameter corresponds to the bEndpointAddress field in the endpoint descriptor.

Return value

WinUsb_ResetPipe returns TRUE if the operation succeeds. Otherwise, this function returns FALSE, and the caller can retrieve the logged error by calling GetLastError.

GetLastError can return the following error code.

Return codeDescription
ERROR_INVALID_HANDLE

The caller passed NULL in the InterfaceHandle parameter.

 

Requirements

Header

Winusb.h (include Winusb.h)

Library

Winusb.lib

See also

WinUSB
WinUsb_Initialize
WinUSB Functions

 

 

Send comments about this topic to Microsoft

Build date: 12/5/2013

Show:
© 2014 Microsoft. All rights reserved.