comedi_get_clock_source — get master clock for a subdevice
#include <comedilib.h>
int comedi_get_clock_source( | comedi_t * device, |
unsigned int subdevice, | |
unsigned int channel, | |
unsigned int * clock, | |
unsigned int * period_ns) ; |
This function queries the master clock for a subdevice, as
set by
comedi_set_clock_source
.
The currently configured master clock
will be written to
*
.
The possible values and their corresponding clocks are
driver-dependant.
The period of the clock in nanoseconds (or zero if it is unknown)
will be written to
clock
*
.
If the subdevice does not support configuring its master clocks
on a per-channel basis, then the period_ns
channel
parameter will be ignored.
It is safe to pass NULL
pointers as the
clock
or
period_ns
parameters. This function is only useable
on subdevices that provide support for the
INSN_CONFIG_GET_CLOCK_SRC
configuration instruction.