Instruction manual

AMPDIO DRIVERS
Page 184
automatically enabled by this interrupt set-up function. In versions of the DLL from 4.40
onwards, all valid interrupt sources are initially enabled at the second level but are no longer
automatically enabled by this interrupt set-up function. In either case, if interrupt sources have
not been explicitly disabled at the second level, there is no need to explicitly enable them.
i = TCsetUserInterrupt2 (h, pfn, wParam, Chip, ISRDATA, Block1,
Port1, Block2, Port2)
where h short: board handle as issued by the
registerBoardEx function.
pfn pointer to function (short, unsigned int,
unsigned long) returning void: a pointer to a
function implemented in the user’s code that
has the format of a TCUserCCallback as
defined below.
wParam unsigned integer: user-supplied value passed
to the user’s callback function.
Chip short: determines interrupt source. The
interrupt source number from 0 to 5 multiplied
by 4 (0, 4, 8, 12, 16, 20). For timer/counter
interrupt or first interrupt line on a PPI chip it is
the address offset of the chip. For second
interrupt line on a PPI chip it is the address
offset of the PPI chip plus 4. Corresponds to bit
positions in interrupt enable register if the card
has one, otherwise use the address offset of
the interrupting chip. The following pre-defined
constants may be used:
X1 = 0 PPIXC0 = 0
X2 = 4 PPIXC3 = 4
Y1 = 8 PPIYC0 = 8
Y2 = 12 PPIYC3 = 12
Z1 = 16 PPIZC0 = 16
Z2 = 20 PPIZC3 = 20
PPIX = 0 PPIYC7 = 8
PPIY = 8 EXT0 = 0
PPIZ = 16 ADC0 = 0
ADC2 = 8
DAC2 = 8
DAC4 = 16
SATRIG = 12
ISRDATA short: type of data to fetch on interrupt.
Block1 unsigned long: usage depends on ISRDATA
value.
Port1 unsigned long: usage depends on ISRDATA
value.
Block2 unsigned long: usage depends on ISRDATA
value.
Port2 unsigned long: usage depends on ISRDATA
value.