Instruction manual
AMPDIO DRIVERS
Page 108
6.4.5 Basic Timer/Counter Functions
6.4.5.1 Test if Timer/Counter is Free — TCisAvailable
Checks if a particular timer/counter channel is currently available on a board. A counter/timer
may not be available for one of two reasons:
1. the counter/timer is not provided by the board specified, or
2. the counter/timer is being used by some other function.
i = TCisAvailable (h, chip, chan)
where h short: board handle as previously issued by
the registerBoardEx function.
chip short: address offset of the timer/counter chip.
One of the following pre-defined constants may
be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12
Z1 = 16
Z2 = 20
chan short: timer/counter channel number within the
chip, i.e. 0, 1, or 2.
Returns short: 0 = Timer/counter NOT available, 1 = Available
or ERRHANDLE
ERRCHAN
Prior Calls registerBoardEx
See Also TCfreeResource
6.4.5.2 Free-up Timer/Counter — TCfreeResource
Frees a timer/counter channel previously reserved for use by one of the following functions:
TCsetMonoShot
TCgenerateAccFreq
i = TCfreeResource (h, chip, chan)
where h short: board handle as issued by the
registerBoardEx function.
chip short: address offset of the timer/counter chip.
One of the following pre-defined constants may
be used:
X1 = 0
X2 = 4
Y1 = 8
Y2 = 12