remove some stuff that is in the lib now
authorDavid Schleef <ds@schleef.org>
Wed, 25 Sep 2002 01:12:16 +0000 (01:12 +0000)
committerDavid Schleef <ds@schleef.org>
Wed, 25 Sep 2002 01:12:16 +0000 (01:12 +0000)
demo/info.c

index 7b3b7e21486b71d9b9548cb395feaedc976cb0e1..787be95e8670cec121efe4a1bacbd89e65e57f17 100644 (file)
@@ -119,74 +119,6 @@ char *tobinary(char *s,int bits,int n)
 
 void probe_max_1chan(comedi_t *it,int s);
 
-int comedi_get_cmd_src_mask(comedi_t *it,unsigned int s,comedi_cmd *cmd)
-{
-       memset(cmd,0,sizeof(*cmd));
-
-       if(!(comedi_get_subdevice_flags(it,s)&SDF_CMD)){
-               return -1;
-       }
-
-       cmd->subdev = s;
-
-       cmd->flags = 0;
-
-       cmd->start_src = TRIG_ANY;
-       cmd->scan_begin_src = TRIG_ANY;
-       cmd->convert_src = TRIG_ANY;
-       cmd->scan_end_src = TRIG_ANY;
-       cmd->stop_src = TRIG_ANY;
-
-       return comedi_command_test(it,cmd);
-}
-
-
-int comedi_get_cmd_fast_1chan(comedi_t *it,unsigned int s,comedi_cmd *cmd)
-{
-       int ret;
-
-       ret = comedi_get_cmd_src_mask(it,s,cmd);
-       if(ret<0)return ret;
-
-       cmd->chanlist_len = 1;
-
-       cmd->scan_end_src = TRIG_COUNT;
-       cmd->scan_end_arg = 1;
-
-       if(cmd->convert_src&TRIG_TIMER){
-               if(cmd->scan_begin_src&TRIG_FOLLOW){
-                       cmd->convert_src = TRIG_TIMER;
-                       cmd->scan_begin_src = TRIG_FOLLOW;
-               }else{
-                       cmd->convert_src = TRIG_TIMER;
-                       cmd->scan_begin_src = TRIG_TIMER;
-               }
-       }else{
-               printf("can't do timed?!?\n");
-               return -1;
-       }
-       if(cmd->stop_src&TRIG_COUNT){
-               cmd->stop_src=TRIG_COUNT;
-               cmd->stop_arg=2;
-       }else if(cmd->stop_src&TRIG_NONE){
-               cmd->stop_src=TRIG_NONE;
-               cmd->stop_arg=0;
-       }else{
-               printf("can't find a good stop_src\n");
-               return -1;
-       }
-
-       ret=comedi_command_test(it,cmd);
-       if(ret==3){
-               /* good */
-               ret=comedi_command_test(it,cmd);
-       }
-       if(ret==4 || ret==0){
-               return 0;
-       }
-       return -1;
-}
-
 void get_command_stuff(comedi_t *it,int s)
 {
        comedi_cmd cmd;
@@ -211,7 +143,7 @@ void probe_max_1chan(comedi_t *it,int s)
        char buf[100];
 
        printf("  command fast 1chan:\n");
-       if(comedi_get_cmd_fast_1chan(it,s,&cmd)<0){
+       if(comedi_get_cmd_generic_timed(it,s,&cmd,1)<0){
                printf("    not supported\n");
        }else{
                printf("    start: %s %d\n",