Function UnmaskIsaIrq installs a hardware interrupt handler. It works as follows:
ULONG IrqCounter = 0;
// Interrupt handler
void __stdcall MyInterruptHandler(ULONG TimeStampLoPart, ULONG TimeStampHiPart)
{
++ IrqCounter;
}
// Main program
hIsa = OpenRapidIsa( 0 );
if (IsRapidIsaOpened(hIsa)) {
...
set ClearRec and ShareRec structures, see below
...
UnmaskIsaIrq( hIsa, MyInterruptHandler );
}
else
... // failed
Calling the function MaskIsaIrq stops hardware interrupt processing:
MaskIsaIrq ( hIsa );
Counter value for the number of handled interrupts is returned by function GetInterruptCounter.
|