Jungo WinDriver  
Official Documentation

◆ WD_IntEnable

#define WD_IntEnable (   h,
  pInterrupt 
)     WD_FUNCTION(IOCTL_WD_INT_ENABLE, h, pInterrupt, sizeof(WD_INTERRUPT), FALSE)

Registers an interrupt service routine (ISR) to be called upon interrupt.

Parameters
[in]hHandle to WinDriver's kernel-mode driver as received from WD_Open()
[in,out]pInterruptPointer to an interrupt information structure
Returns
Returns WD_STATUS_SUCCESS (0) on success, or an appropriate error code otherwise
Remarks
For more information regarding interrupt handling please refer to the Interrupts section in the WinDriver PCI Manual.

kpCall is relevant for Kernel PlugIn implementation.

WinDriver must be registered with the OS as the driver of the device before enabling interrupts. For Plug-and-Play hardware (PCI/PCI Express) on Windows platforms, this association is made by installing an INF file for the device. If the INF file is not installed, WD_IntEnable() will fail with a WD_NO_DEVICE_OBJECT error.

BZERO(cardReg);
cardReg.Card.dwItems = 1;
cardReg.Card.Item[0].fNotSharable = 1;
cardReg.Card.Item[0].I.Int.dwInterrupt = 10; /* IRQ 10 */
/* INTERRUPT_LEVEL_SENSITIVE - set to level-sensitive
interrupts, otherwise should be 0.
ISA cards are usually Edge Triggered while PCI cards
are usually Level Sensitive. */
cardReg.Card.Item[0].I.Int.dwOptions =
WD_CardRegister(hWD, &cardReg);
if (cardReg.hCard == 0)
{
printf("Could not lock device\n");
}
else
{
BZERO(intrp);
intrp.hInterrupt = cardReg.Card.Item[0].I.Int.hInterrupt;
intrp.Cmd = NULL;
intrp.dwCmds = 0;
intrp.dwOptions = 0;
WD_IntEnable(hWD, &intrp);
}
if (!intrp.fEnableOk)
{
printf("Failed enabling interrupt\n");
}
#define NULL
Definition: kpstdlib.h:269
#define FALSE
Definition: kpstdlib.h:261
DWORD hCard
Handle of card.
Definition: windrvr.h:798
WD_CARD Card
Card to register.
Definition: windrvr.h:795
DWORD fCheckLockOnly
Only check if card is lockable, return hCard=1 if OK.
Definition: windrvr.h:796
WD_ITEMS Item[WD_CARD_ITEMS]
Definition: windrvr.h:790
DWORD dwItems
Definition: windrvr.h:788
DWORD fEnableOk
TRUE if interrupt was enabled (WD_IntEnable() succeeded).
Definition: windrvr.h:658
DWORD hInterrupt
Handle of interrupt.
Definition: windrvr.h:648
DWORD dwOptions
Interrupt options: can be INTERRUPT_CMD_COPY.
Definition: windrvr.h:649
WD_TRANSFER * Cmd
Commands to do on interrupt.
Definition: windrvr.h:651
DWORD dwCmds
Number of commands.
Definition: windrvr.h:653
DWORD hInterrupt
Handle of the installed interrupt; returned by WD_CardRegister()
Definition: windrvr.h:775
DWORD dwOptions
Interrupt options: INTERRUPT_LATCHED – latched INTERRUPT_LEVEL_SENSITIVE – level sensitive INTERRUPT_...
Definition: windrvr.h:770
DWORD dwInterrupt
Number of interrupt to install.
Definition: windrvr.h:769
DWORD fNotSharable
Definition: windrvr.h:735
union WD_ITEMS::I I
DWORD item
ITEM_TYPE.
Definition: windrvr.h:734
struct WD_ITEMS::I::Int Int
@ ITEM_INTERRUPT
Interrupt.
Definition: windrvr.h:715
#define WD_IntEnable(h, pInterrupt)
Registers an interrupt service routine (ISR) to be called upon interrupt.
Definition: windrvr.h:2643
#define WD_CardRegister(h, pCard)
Card registration function.
Definition: windrvr.h:2245
#define BZERO(buf)
Definition: windrvr.h:1573
@ INTERRUPT_LEVEL_SENSITIVE
Legacy Level Sensitive Interrupts.
Definition: windrvr.h:613

Definition at line 2643 of file windrvr.h.