APCI-/CPCI-1500 Technical
description Chapter 10
100
b) Example in C for DOS and Windows 3.1x
unsigned char b_EventCpt [2], b_TimerCounterCpt [3];
/* Global buffer
*/
unsigned char b_WatchdogCpt, b_VoltageErrorCpt;
_VOID_ v_InterruptRoutine (BYTE_ b_BoardHandle, BYTE_ b_InterruptMask,
BYTE_b_InputChannelNbr)
{
if (b_InterruptMask & 0x1)
{
/**************************/
b_EventCpt [0] = b_EventCpt [0] + 1;
/* Event port 1 interrupt */
}
/**************************/
if (b_InterruptMask & 0x1)
{
/**************************/
b_EventCpt [1] = b_EventCpt [1] + 1;
/* Event port 2 interrupt */
}
/**************************/
if (b_InterruptMask & 0x4)
{
/*****************************/
b_TimerCounterCpt [0] = b_TimerCounterCpt [0] + 1; /* Timer/Counter 1 interrupt */
}
/*****************************/
if (b_InterruptMask & 0x8)
{
/*****************************/
b_TimerCounterCpt [1] = b_TimerCounterCpt [1] + 1; /* Timer/Counter 2 interrupt */
}
/*****************************/
if (b_InterruptMask & 0x10)
{
/***********************/
b_TimerCounterCpt [2] = b_TimerCounterCpt [2] + 1; /* Counter 3 interrupt */
}
/***********************/
if (b_InterruptMask & 0x20)
{
/**********************/
b_WatchdogCpt = b_Watch 1;
/* Watchdog interrupt */
}
/**********************/
if (b_InterruptMask & 0xC0)
{
/*****************/
b_VoltageErrorCpt = b_VoltageEr 1;
/* Voltage error */
}
/*****************/