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:781
WD_CARD Card
Card to register.
Definition: windrvr.h:778
DWORD fCheckLockOnly
Only check if card is lockable, return hCard=1 if OK.
Definition: windrvr.h:779
WD_ITEMS Item[WD_CARD_ITEMS]
Definition: windrvr.h:773
DWORD dwItems
Definition: windrvr.h:771
DWORD fEnableOk
TRUE if interrupt was enabled (WD_IntEnable() succeeded).
Definition: windrvr.h:654
DWORD hInterrupt
Handle of interrupt.
Definition: windrvr.h:644
DWORD dwOptions
Interrupt options: can be INTERRUPT_CMD_COPY.
Definition: windrvr.h:645
WD_TRANSFER * Cmd
Commands to do on interrupt.
Definition: windrvr.h:647
DWORD dwCmds
Number of commands.
Definition: windrvr.h:649
DWORD hInterrupt
Handle of the installed interrupt; returned by WD_CardRegister()
Definition: windrvr.h:758
DWORD dwOptions
Interrupt options: INTERRUPT_LATCHED – latched INTERRUPT_LEVEL_SENSITIVE – level sensitive INTERRUPT_...
Definition: windrvr.h:753
DWORD dwInterrupt
Number of interrupt to install.
Definition: windrvr.h:752
DWORD fNotSharable
Definition: windrvr.h:718
union WD_ITEMS::I I
DWORD item
ITEM_TYPE.
Definition: windrvr.h:717
struct WD_ITEMS::I::Int Int
@ ITEM_INTERRUPT
Interrupt.
Definition: windrvr.h:698
#define WD_IntEnable(h, pInterrupt)
Registers an interrupt service routine (ISR) to be called upon interrupt.
Definition: windrvr.h:2620
#define WD_CardRegister(h, pCard)
Card registration function.
Definition: windrvr.h:2225
#define BZERO(buf)
Definition: windrvr.h:1553
@ INTERRUPT_LEVEL_SENSITIVE
Legacy Level Sensitive Interrupts.
Definition: windrvr.h:609

Definition at line 2620 of file windrvr.h.