Partager via


ResetDefaultEndpoint (Windows Embedded CE 6.0)

1/6/2010

This function attempts to reset the default endpoint zero.

Syntax

DWORD ResetDefaultEndpoint(
  LPCUSB_FUNCS UsbFuncs,
  HANDLE hUsbDevice
);

Parameters

  • UsbFuncs
    [in] Pointer to a USB_FUNCS structure.
  • hUsbDevice
    [in] Handle to a USB device.

Return Value

Microsoft® Win32® error code. For more information, see GetLastError.

Remarks

The following code example shows a trace where the default endpoint zero cannot be reset.

CQueuedPipe(Control)::CheckForDoneTransfers - failure on TD 0x1358c0, address = 1, endpoint = 0, errorCounter = 0, status field = 0x22
CFunction::SetOrClearFeature - recipient = 2, wIndex = 0, set/clear = 0x1, feature = 0x0, FAILED
CHub(Root tier 0)::HubStatusChangeThread - device on port 1 is connected but has been disabled. Trying to detach & re-attach

The following table shows the status field. It is a bitmask of bits 17-22 of the status field defined in the Universal Host Controller Interface (UHCI) Specification. This status information is sent from an endpoint of the downstream device.

Bit Description

0x01

Bit stuffing error.

0x02

Cyclic redundancy check (CRC) or time-out error. These two errors are indistinguishable.

0x04

NAK handshake packet. You should not see this bit set in normal operation.

0x08

Babble detected.

0x10

Data buffer overrun.

0x20

STALL handshake packet response.

Requirements

Header usbclient.h
Windows Embedded CE Windows CE 2.10 and later

See Also

Reference

USB Host Client Driver Functions
USB_FUNCS