From e3ab787c666b57e40407a7b8182d48a9583c2c7e Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 18 Mar 2002 22:11:32 +0000 Subject: [PATCH] Added multi-channel support --- demo/ao_waveform.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/demo/ao_waveform.c b/demo/ao_waveform.c index d244289..09a17fc 100644 --- a/demo/ao_waveform.c +++ b/demo/ao_waveform.c @@ -92,10 +92,13 @@ int main(int argc, char *argv[]) int n,m; int total=0; comedi_t *dev; - unsigned int chanlist[1]; + unsigned int chanlist[16]; parse_options(argc,argv); + /* Force n_chan to be 1 */ + n_chan = 1; + if(value){ waveform_frequency = value; } @@ -117,14 +120,15 @@ int main(int argc, char *argv[]) cmd.convert_src = TRIG_NOW; cmd.convert_arg = 0; cmd.scan_end_src = TRIG_COUNT; - cmd.scan_end_arg = 1; + cmd.scan_end_arg = n_chan; cmd.stop_src = TRIG_NONE; cmd.stop_arg = 0; cmd.chanlist = chanlist; - cmd.chanlist_len = 1; + cmd.chanlist_len = n_chan; chanlist[0] = CR_PACK(channel,range,aref); + chanlist[1] = CR_PACK(channel+1,range,aref); dds_init(); -- 2.26.2