UrsReportHardwareEvent function (ursdevice.h)

Notifies the USB dual-role class extension about a new hardware event.

Syntax

void UrsReportHardwareEvent(
  [in] WDFDEVICE          Device,
  [in] URS_HARDWARE_EVENT HardwareEvent
);

Parameters

[in] Device

A handle to the framework device object that the client driver retrieved in the previous call to WdfDeviceCreate.

[in] HardwareEvent

A URS_HARDWARE_EVENT-type value that indicates the type of event that occurred.

Return value

None

Remarks

Before reporting any hardware events, the client driver for the dual-role controller must indicate to the class extension that the driver supports hardware events by calling UrsSetHardwareEventSupport.

The client driver cannot pass UrsHardwareEventNone as the HardwareEvent parameter value. That value is reserved for internal use.

The client driver must call this method to report any hardware event, such as ID-pin interrupts. Typically, in the driver's implementation of the EvtInterruptIsr callback, the driver reads the ID-pin state and reports the event to the class extension by calling this method.

Requirements

Requirement Value
Minimum supported client Windows 10
Minimum supported server Windows Server 2016
Target Platform Windows
Minimum KMDF version 1.15
Header ursdevice.h (include Urscx.h)
Library Urscxstub.lib
IRQL HIGH_LEVEL

See also