13 #include "comedi_test.h"
15 static int get_chunks_per_length(int length);
19 int test_cmd_fifo_depth_check(void)
23 if(!(comedi_get_subdevice_flags(device,subdevice)&SDF_CMD)){
24 printf("not applicable\n");
28 for(len=64;len<65536;len<<=1){
29 printf("%d, %d\n",len,get_chunks_per_length(len));
35 static int get_chunks_per_length(int length)
39 unsigned int chanlist[1];
45 if(comedi_get_cmd_generic_timed(device,subdevice,&cmd)<0){
46 printf(" not supported\n");
50 if(realtime)cmd.flags |= TRIG_RT;
52 cmd.chanlist = chanlist;
54 cmd.stop_arg = length;
56 chanlist[0] = CR_PACK(0,0,0);
58 comedi_command(device,&cmd);
62 ret = read(comedi_fileno(device),buf,BUFSZ);