Lines Matching refs:cmd

229 	struct comedi_cmd *cmd = &async->cmd;  in usbduxfast_ai_handle_urb()  local
241 if (cmd->stop_src == TRIG_COUNT && in usbduxfast_ai_handle_urb()
242 async->scans_done >= cmd->stop_arg) in usbduxfast_ai_handle_urb()
321 struct comedi_cmd *cmd) in usbduxfast_ai_check_chanlist() argument
323 unsigned int gain0 = CR_RANGE(cmd->chanlist[0]); in usbduxfast_ai_check_chanlist()
326 if (cmd->chanlist_len > 3 && cmd->chanlist_len != 16) { in usbduxfast_ai_check_chanlist()
331 for (i = 0; i < cmd->chanlist_len; ++i) { in usbduxfast_ai_check_chanlist()
332 unsigned int chan = CR_CHAN(cmd->chanlist[i]); in usbduxfast_ai_check_chanlist()
333 unsigned int gain = CR_RANGE(cmd->chanlist[i]); in usbduxfast_ai_check_chanlist()
340 if (gain != gain0 && cmd->chanlist_len > 3) { in usbduxfast_ai_check_chanlist()
351 struct comedi_cmd *cmd) in usbduxfast_ai_cmdtest() argument
360 err |= comedi_check_trigger_src(&cmd->start_src, in usbduxfast_ai_cmdtest()
362 err |= comedi_check_trigger_src(&cmd->scan_begin_src, TRIG_FOLLOW); in usbduxfast_ai_cmdtest()
363 err |= comedi_check_trigger_src(&cmd->convert_src, TRIG_TIMER); in usbduxfast_ai_cmdtest()
364 err |= comedi_check_trigger_src(&cmd->scan_end_src, TRIG_COUNT); in usbduxfast_ai_cmdtest()
365 err |= comedi_check_trigger_src(&cmd->stop_src, TRIG_COUNT | TRIG_NONE); in usbduxfast_ai_cmdtest()
372 err |= comedi_check_trigger_is_unique(cmd->start_src); in usbduxfast_ai_cmdtest()
373 err |= comedi_check_trigger_is_unique(cmd->stop_src); in usbduxfast_ai_cmdtest()
382 err |= comedi_check_trigger_arg_is(&cmd->start_arg, 0); in usbduxfast_ai_cmdtest()
384 if (!cmd->chanlist_len) in usbduxfast_ai_cmdtest()
388 if (cmd->start_src == TRIG_EXT && in usbduxfast_ai_cmdtest()
389 cmd->chanlist_len != 1 && cmd->chanlist_len != 16) in usbduxfast_ai_cmdtest()
392 err |= comedi_check_trigger_arg_is(&cmd->scan_end_arg, in usbduxfast_ai_cmdtest()
393 cmd->chanlist_len); in usbduxfast_ai_cmdtest()
402 steps = (cmd->convert_arg * 30) / 1000; in usbduxfast_ai_cmdtest()
403 if (cmd->chanlist_len != 1) in usbduxfast_ai_cmdtest()
412 err |= comedi_check_trigger_arg_is(&cmd->convert_arg, arg); in usbduxfast_ai_cmdtest()
415 if (cmd->stop_src == TRIG_COUNT) in usbduxfast_ai_cmdtest()
416 err |= comedi_check_trigger_arg_min(&cmd->stop_arg, 1); in usbduxfast_ai_cmdtest()
418 err |= comedi_check_trigger_arg_is(&cmd->stop_arg, 0); in usbduxfast_ai_cmdtest()
426 if (cmd->chanlist && cmd->chanlist_len > 0) in usbduxfast_ai_cmdtest()
427 err |= usbduxfast_ai_check_chanlist(dev, s, cmd); in usbduxfast_ai_cmdtest()
439 struct comedi_cmd *cmd = &s->async->cmd; in usbduxfast_ai_inttrig() local
442 if (trig_num != cmd->start_arg) in usbduxfast_ai_inttrig()
468 struct comedi_cmd *cmd = &s->async->cmd; in usbduxfast_ai_cmd() local
485 steps = (cmd->convert_arg * 30) / 1000; in usbduxfast_ai_cmd()
487 switch (cmd->chanlist_len) { in usbduxfast_ai_cmd()
493 if (CR_RANGE(cmd->chanlist[0]) > 0) in usbduxfast_ai_cmd()
504 if (cmd->start_src == TRIG_EXT) { in usbduxfast_ai_cmd()
576 if (CR_RANGE(cmd->chanlist[0]) > 0) in usbduxfast_ai_cmd()
587 if (CR_RANGE(cmd->chanlist[1]) > 0) in usbduxfast_ai_cmd()
610 if (CR_RANGE(cmd->chanlist[0]) > 0) in usbduxfast_ai_cmd()
634 if (CR_RANGE(cmd->chanlist[j]) > 0) in usbduxfast_ai_cmd()
647 if (CR_RANGE(cmd->chanlist[j + 1]) > 0) in usbduxfast_ai_cmd()
667 if (CR_RANGE(cmd->chanlist[0]) > 0) in usbduxfast_ai_cmd()
682 if (CR_RANGE(cmd->chanlist[0]) > 0) in usbduxfast_ai_cmd()
687 if (cmd->start_src == TRIG_EXT) { in usbduxfast_ai_cmd()
737 if ((cmd->start_src == TRIG_NOW) || (cmd->start_src == TRIG_EXT)) { in usbduxfast_ai_cmd()