WUDF_INTERRUPT_CONFIG structure (wudfinterrupt.h)

[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]

The WUDF_INTERRUPT_CONFIG structure contains configuration information for a device interrupt.

Syntax

typedef struct _WUDF_INTERRUPT_CONFIG {
  ULONG                           Size;
  WDF_TRI_STATE                   ShareVector;
  BOOLEAN                         AutomaticSerialization;
  PFN_WUDF_INTERRUPT_ISR          OnInterruptIsr;
  PFN_WUDF_INTERRUPT_ENABLE       OnInterruptEnable;
  PFN_WUDF_INTERRUPT_DISABLE      OnInterruptDisable;
  PFN_WUDF_INTERRUPT_WORKITEM     OnInterruptWorkItem;
  PCM_PARTIAL_RESOURCE_DESCRIPTOR InterruptRaw;
  PCM_PARTIAL_RESOURCE_DESCRIPTOR InterruptTranslated;
} WUDF_INTERRUPT_CONFIG, *PWUDF_INTERRUPT_CONFIG;

Members

Size

The size, in bytes, of this structure.

ShareVector

A WDF_TRI_STATE-typed value. If this value is WdfTrue, the interrupt vector can be shared. If the value is WdfFalse, the interrupt vector cannot be shared. If the value is WdfDefault and the interrupt is level-triggered, the Plug and Play manager uses the bus driver's value. If the value is WdfDefault and the interrupt is not level-triggered, the interrupt vector cannot be shared.

AutomaticSerialization

A Boolean value that, if TRUE, indicates that the framework will synchronize execution of the interrupt object's OnInterruptWorkItem callback function with other callback functions that use the framework's callback synchronization functionality. See Remarks for more information.

OnInterruptIsr

A pointer to the driver's OnInterruptIsr callback function, or NULL.

OnInterruptEnable

A pointer to the driver's OnInterruptEnable callback function, or NULL.

OnInterruptDisable

A pointer to the driver's OnInterruptDisable callback function, or NULL.

OnInterruptWorkItem

A pointer to the driver's OnInterruptWorkItem callback function, or NULL.

InterruptRaw

A pointer to the CM_PARTIAL_RESOURCE_DESCRIPTOR structure that describes the raw resources that the system assigned to the interrupt. This member is only used if the interrupt is created in the OnPrepareHardware callback.

InterruptTranslated

A pointer to the CM_PARTIAL_RESOURCE_DESCRIPTOR structure that describes the translated resources that the system assigned to the interrupt. This member is only used if the interrupt is created in the OnPrepareHardware callback.

Remarks

The WUDF_INTERRUPT_CONFIG structure is used as input to IWDFDevice3::CreateInterrupt.

To initialize a WUDF_INTERRUPT_CONFIG structure, your driver should first call WUDF_INTERRUPT_CONFIG_INIT and then fill in structure members that WUDF_INTERRUPT_CONFIG_INIT does not initialize.

Before setting AutomaticSerialization to TRUE, the driver must call IWDFDeviceInitialize::SetLockingConstraint with the LockType parameter set to WdfDeviceLevel.

Your driver should include Wudfwdm.h, which contains the definition of CM_PARTIAL_RESOURCE_DESCRIPTOR.

UMDF supports edge-triggered, line-based interrupts and message-signaled interrupts (MSI) on all framework-supported operating systems. Because these types of interrupt resources are not shared, a driver that uses them should set the ShareVector member of this structure to WdfFalse or WdfUseDefault. If the driver specifies an invalid ShareVector value, the driver fails to start.

Requirements

Requirement Value
Minimum UMDF version 1.11
Header wudfinterrupt.h

See also

IWDFDevice3::CreateInterrupt

IWDFDeviceInitialize::SetLockingConstraint

WUDF_INTERRUPT_CONFIG_INIT