Instruction manual

AMPDIO DRIVERS
Page 188
Chan1 short: first timer/counter channel or PPI port to
read or write (0, 1, 2).
Chip2 short: address offset of the second
timer/counter or PPI chip to be read or written:
X1 = 0 X2 = 4 PPIX = 0
Y1 = 8 Y2 = 12 PPIY = 8
Z1 = 16 Z2 = 20 PPIZ = 16
Chan2 short: second timer/counter channel or PPI
port to read or write (0, 1, 2)
Returns short: User Interrupt handle (>= 0). Use this to free the user interrupt with
TCfreeUserInterrupt when finished.
or ERRHANDLE
ERRCHAN
ERRDATA
Prior Calls registerBoardEx
See Also TCUserCBCallback
TCfreeUserInterrupt
TCsetBufferUserInterruptAIO
TCsetBufferUserInterrupt2
TCsetUserInterrupt
TCsetNCBufferUserInterrupt
enableInterrupts
disableInterrupts
6.4.14.2 Prepare a Buffered User Interrupt for Analogue I/O TCsetBufferUserInterruptAIO
Used to register a callback function that will be called to process a buffers-worth of data that
has been read from or is to be written to the card over a number of interrupts. This variant is
used to support reading from or writing to analogue channels.
SUPPORTED IN VERSION 4.00 ONWARDS.
If the interrupt source is enabled at the first and second levels, it will be activated. Interrupts
are initially disabled at the first level; use enableInterrupts to enable them. In versions of the
DLL up to version 4.39, all interrupt sources are initially disabled at the second level but are
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 = TCsetBufferUserInterruptAIO (h, pfn, wParam, Chip, SizeReq,
fContin, ISRDATA, Group, ChMask)
where h short: board handle as issued by the
registerBoardEx function.
pfn pointer to function (short, unsigned int,
unsigned long, pointer to unsigned long)
returning void: a pointer to a function
implemented in the user’s code that has the