Instruction manual
AMPDIO DRIVERS
Page 47
source, the type of data transfer required and any other parameters required to specify where the
data is to be read from or written to (see table of data request types in section 3.4.3).
The TCsetBufferUserInterrupt function is mainly for digital resources; the following types of data
transfer may be requested:
ISR_NODATA
ISR_READ_16COUNT
ISR_READ_16COUNTSTAT
ISR_READ_32COUNT
ISR_READ_32COUNTSTAT
ISR_READ_PPIABC
ISR_READ_2PPIABC
ISR_READ_3PPIABC
ISR_READ_PPIC
ISR_PC27
ISR_READ_DATA8
ISR_READ_DATA16
ISR_WRITE_16COUNT
ISR_WRITE_32COUNT
ISR_WRITE_DATA8
ISR_WRITE_DATA16
ISR_WRITE_PPIABC
ISR_WRITE_2PPIABC
ISR_WRITE_3PPIABC
The TCsetBufferUserInterruptAIO function is used for most analogue resources; the following
types of data transfer may be requested:
ISR_READ_ADCS
ISR_READ_ADCSNOFIFO
ISR_READ_ADCSFIFO
ISR_READ_ADCSASAP
ISR_WRITE_DACS
ISR_WRITE_DACSNOFIFO
ISR_WRITE_DACSFIFO
In addition, there is a TCsetBufferUserInterrupt2 function (see section 6.4.14.3) which supports the
following types of data transfer:
ISR_WRITE_2DACS
The functions also allow the user to specify the length of buffers required. The minimum length
allowed is 1, but for the supplied DIO_TC.DLL code prior to AMPDIO v4.23 there is a bug which
stops buffer lengths less than 2 working correctly. The buffers are created by the DLL.
The functions also allow the user to specify whether double buffering or single buffering is to be
used. If double buffering is being used, the DIO_TC.DLL and the driver try to keep up a continuous
flow of data between the user and the driver — the driver can be dealing with one buffer while the
user callback function is dealing with the other. This mode is used when the fContinuous parameter
is set to TRUE in the interrupt set-up function. If fContinuous is set to FALSE, single buffering is
used and there is no attempt to maintain a continuous flow of data between buffers.
The functions also specify the callback function to be called and a user parameter that is passed
on to this callback function when it is called. The user must supply a callback function of the form:
typedef VOID (CALLBACK *TTCBCALLBACK)( short h
, WPARAM wParam
, ULONG sizeofBuffer