Instruction manual

AMPDIO DRIVERS
Page 40
Each Amplicon card has up to 6 individual sources that can cause an interrupt to occur (some have
fewer than 6 interrupt sources). The ADIO library allows a user supplied function to be called when
a particular interrupt event occurs, such as a timer interrupt or a certain PPI port pin going high.
Once the user function has been set up, the enableInterrupts and disableInterrupts functions (see
sections 6.4.2.1 and 6.4.2.2) can then be called to enable and disable the interrupts, and, when
finished, the TCfreeUserInterrupt function (see section 6.4.13.5) can be called to free up the
resources so they can be used again by another service.
The DLL supports a number of different functions to set up user interrupts, some for digital
resources, some for analogue resources, some for transferring buffers and some that have their
own threads inside the DLL for callbacks and some that do not have their own threads and do not
use callbacks. The interrupt set-up functions return a handle to refer to the user interrupt or an
error code. Other functions are available for handling non-callback user interrupts.
TCsetUserInterrupt Sets up a basic user interrupt callback for a digital resource.
TCsetUserInterruptAIO Sets up a basic user interrupt callback for an analogue
resource.
TCsetBufferUserInterrupt
Sets up a buffered user interrupt callback for a digital
resource.
TCsetBufferUserInterruptAIO
Sets up a buffered user interrupt callback for an analogue
resource.
TCsetNCBufferUserInterrupt
Sets up a non-callback buffered user interrupt for a digital
resource.
TCsetNCBufferUserInterruptAIO
Sets up a non-callback buffered user interrupt for an
analogue resource.
TCdriveNCBufferUserInterrupt
Used to transfer buffers of data for non-callback user
interrupts.
TCwaitNCBufferReady
Used to poll or wait until a non-callback buffered user
interrupt is ready for the next data transfer, with timeout
facility.
TCwaitMultiNCBufferReady
Used to poll or wait until one of several non-callback
buffered user interrupts is ready for the next data transfer,
with timeout facility.
TCfreeUserInterrupt
Frees resources for a user interrupt.
enableInterrupts
Enable user interrupts globally at the first level.
disableInterrupts
Disable user interrupts globally at the first level.
TCenableInterruptChip
Enable an individual user interrupt trigger source at the
second level. Note that all user interrupt sources are initially
enabled at the second level by the registerBoard functions,
so this is not needed unless the user interrupt trigger source
has been explicitly disabled.
TCdisableInterruptChip
Disable an individual user interrupt trigger source at the
second level. Note that all user interrupt sources are initially
enabled at the second level by the registerBoard functions.