User manual
Technical reference 32
Copyright 2004 Pico Technology Limited. All rights reserved.
3.3.4.7 usb_tc08_legacy_get_cycle
short usb_tc08_legacy_get_cycle (long * cycle,
short handle)
This routine gives the number of complete cycles of readings taken from a particular USB TC-08.
Calling
usb_tc08_legacy_get_temp
causes the most recent reading for the specified channel to be
returned immediately. If you wish to record values only when the driver has taken a new reading, you
can use this routine to find out how many complete cycles of readings the driver has taken. Then you
can call
usb_tc08_legacy_get_temp
, but only when the cycle has been incremented.
Arguments:
handle
- Specifies a USB TC-08 unit.
cycle
- Pointer to a location where the cycle number is to be stored.
Returns:
0
- Use
usb_tc08_get_last_error
.
1
- Legacy get cycle successful.
Tip: Do not test for an exact cycle number; instead, test for a different cycle number as your application
may have missed readings. See the
Legacy mode
section for an example.
Note: This function should not be called unless you are operating the USB TC-08 in legacy mode,
having called
usb_tc08_legacy_run
.