Instruction manual

AMPDIO DRIVERS
Page 115
6.4.5.10 Read Timer/Counter Status TCgetStatus
Returns the mode and status of a timer/counter by performing a read-back operation on the
channel. This does not work on PC24E, PC25E, PC26AT, PC27E or PC30AT as they have
the wrong sort of timer/counter chip.
i = TCgetStatus (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
Z1 = 16
Z2 = 20
chan short: timer/counter channel number within the
chip (0, 1 or 2).
Returns short: Timer counter status byte. See the 82C54 data sheet for details.
or ERRHANDLE
ERRCHAN
Prior Calls registerBoardEx
TCsetMode
TCsetCount
See Also TCgetCount
TCgetMode
6.4.5.11 Get Timer/Counter Mode TCgetMode
Gets a timer/counter channel’s current mode, if it has been configured.
Normally, this returns the last mode configured by a function such as TCsetMode or one of
the higher-level timer/counter functions. If the mode has not been set since the board was
registered, the timer/counter chip will be queried if this is supported. (Querying the mode from
the timer/counter chip is not supported on PC24E, PC25E, PC26AT, PC27E and PC30AT.) If
the timer/counter chip reports anything other than a 16-bit binary counter mode, this is
considered invalid. The function returns ERRSUPPORT if no mode has been set and a valid
mode cannot be read from the timer/counter chip.
SUPPORTED IN VERSION 4.40 ONWARDS.
i = TCgetMode (h, chip, chan, pmode)
where h short: board handle as issued by the
registerBoardEx function.