#include "examples.h"
-static int comedi_internal_trigger(comedi_t *dev, unsigned int subd, unsigned int trignum)
-{
- comedi_insn insn;
- lsampl_t data[1];
-
- memset(&insn, 0, sizeof(comedi_insn));
- insn.insn = INSN_INTTRIG;
- insn.subdev = subd;
- insn.data = data;
- insn.n = 1;
-
- data[0] = trignum;
-
- return comedi_do_insn(dev, &insn);
-}
-
static void write_waveform(sampl_t *buffer, int size, double amplitude, double offset, int maxdata)
{
int i;
void dds_init_pseudocycloid(void);
void dds_init_sawtooth(void);
-int comedi_internal_trigger(comedi_t *dev, unsigned int subd, unsigned int trignum)
-{
- comedi_insn insn;
- lsampl_t data[1];
-
- memset(&insn, 0, sizeof(comedi_insn));
- insn.insn = INSN_INTTRIG;
- insn.subdev = subd;
- insn.data = data;
- insn.n = 1;
-
- data[0] = trignum;
-
- return comedi_do_insn(dev, &insn);
-}
-
-
int main(int argc, char *argv[])
{
comedi_cmd cmd;
}
return 0;
}
+
+int comedi_internal_trigger(comedi_t *dev, unsigned int subd, unsigned int trignum)
+{
+ comedi_insn insn;
+ lsampl_t data[1];
+
+ memset(&insn, 0, sizeof(comedi_insn));
+ insn.insn = INSN_INTTRIG;
+ insn.subdev = subd;
+ insn.data = data;
+ insn.n = 1;
+
+ data[0] = trignum;
+
+ return comedi_do_insn(dev, &insn);
+}
extern int set_counter_mode(comedi_t *device, unsigned subdevice, lsampl_t mode_bits);
extern int set_clock_source(comedi_t *device, unsigned subdevice, lsampl_t clock, lsampl_t period_ns);
extern int set_gate_source(comedi_t *device, unsigned subdevice, lsampl_t gate_index, lsampl_t gate_source);
+extern int comedi_internal_trigger(comedi_t *dev, unsigned int subd, unsigned int trignum);
#define sec_to_nsec(x) ((x)*1000000000)
#define sec_to_usec(x) ((x)*1000000)