diff options
| author | 2007-02-14 05:29:18 +0000 | |
|---|---|---|
| committer | 2007-02-14 05:29:18 +0000 | |
| commit | fa981a8b96ec3d09385a0b14b4342e574b7bbe29 (patch) | |
| tree | 512bc4640fd1f1501d4c2af09469224d881f07b9 /src/raw1394.h | |
| parent | bugfix segfault in raw1394_iso_shutdown on no iso activity due to not initial... (diff) | |
added raw1394_read_cycle_timer, contributed by Pieter Palmers
git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@169 53a565d1-3bb7-0310-b661-cf11e63c67ab
Diffstat (limited to 'src/raw1394.h')
| -rw-r--r-- | src/raw1394.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/raw1394.h b/src/raw1394.h index 4f8fa4b..751c153 100644 --- a/src/raw1394.h +++ b/src/raw1394.h @@ -118,7 +118,6 @@ enum raw1394_modify_mode { RAW1394_MODIFY_FREE }; - #ifdef __cplusplus extern "C" { #endif @@ -328,6 +327,25 @@ void raw1394_iso_stop(raw1394handle_t handle); **/ void raw1394_iso_shutdown(raw1394handle_t handle); +/** + * raw1394_get_cycle_timer - get the current value of the cycle timer + * @handle: libraw1394 handle + * @cycle_timer: buffer for Isochronous Cycle Timer + * @local_time: buffer for local system time in microseconds since Epoch + * + * Simultaneously reads the cycle timer register together with the system clock. + * + * Format of @cycle_timer, from MSB to LSB: 7 bits cycleSeconds (seconds, or + * number of cycleCount rollovers), 13 bits cycleCount (isochronous cycles, or + * cycleOffset rollovers), 12 bits cycleOffset (24.576 MHz clock ticks, not + * provided on some hardware). The union of cycleSeconds and cycleCount is the + * current cycle number. The nominal duration of a cycle is 125 microseconds. + * + * Returns: the error code of the ioctl, or 0 if successful. + **/ +int raw1394_read_cycle_timer(raw1394handle_t handle, + u_int32_t *cycle_timer, u_int64_t *local_time); + typedef int raw1394_errcode_t; #define raw1394_make_errcode(ack, rcode) (((ack) << 16) | rcode) #define raw1394_internal_err(errcode) ((errcode) < 0) |
