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:268
#define FALSE
Definition: kpstdlib.h:260
DWORD hCard
Handle of card.
Definition: windrvr.h:777
WD_CARD Card
Card to register.
Definition: windrvr.h:774
DWORD fCheckLockOnly
Only check if card is lockable, return hCard=1 if OK.
Definition: windrvr.h:775
WD_ITEMS Item[WD_CARD_ITEMS]
Definition: windrvr.h:769
DWORD dwItems
Definition: windrvr.h:767
DWORD fEnableOk
TRUE if interrupt was enabled (WD_IntEnable() succeeded).
Definition: windrvr.h:650
DWORD hInterrupt
Handle of interrupt.
Definition: windrvr.h:640
DWORD dwOptions
Interrupt options: can be INTERRUPT_CMD_COPY.
Definition: windrvr.h:641
WD_TRANSFER * Cmd
Commands to do on interrupt.
Definition: windrvr.h:643
DWORD dwCmds
Number of commands.
Definition: windrvr.h:645
DWORD hInterrupt
Handle of the installed interrupt; returned by WD_CardRegister()
Definition: windrvr.h:754
DWORD dwOptions
Interrupt options: INTERRUPT_LATCHED – latched INTERRUPT_LEVEL_SENSITIVE – level sensitive INTERRUPT_...
Definition: windrvr.h:749
DWORD dwInterrupt
Number of interrupt to install.
Definition: windrvr.h:748
DWORD fNotSharable
Definition: windrvr.h:714
union WD_ITEMS::I I
DWORD item
ITEM_TYPE.
Definition: windrvr.h:713
struct WD_ITEMS::I::Int Int
@ ITEM_INTERRUPT
Interrupt.
Definition: windrvr.h:694
#define WD_IntEnable(h, pInterrupt)
Registers an interrupt service routine (ISR) to be called upon interrupt.
Definition: windrvr.h:2615
#define WD_CardRegister(h, pCard)
Card registration function.
Definition: windrvr.h:2220
#define BZERO(buf)
Definition: windrvr.h:1548
@ INTERRUPT_LEVEL_SENSITIVE
Legacy Level Sensitive Interrupts.
Definition: windrvr.h:605

Definition at line 2615 of file windrvr.h.