return 0;
}
+/*
+ * This function tests reading with n=0.
+ */
+int test_insn_read_0(void)
+{
+ comedi_insn it;
+ lsampl_t data = 0xffffffff;
+ int ret;
+ int type;
+
+ type = comedi_get_subdevice_type(device,subdevice);
+ if(type==COMEDI_SUBD_UNUSED){
+ printf("not applicable\n");
+ return 0;
+ }
+
+ memset(&it,0,sizeof(it));
+ it.subdev = subdevice;
+ it.insn = INSN_READ;
+ it.n = 0;
+ it.chanspec = CR_PACK(0,0,0);
+ it.data = &data;
+
+ ret = comedi_do_insn(device,&it);
+
+ if(ret<0){
+ printf("E: comedi_do_insn: %s\n",strerror(errno));
+ }else if(ret==0){
+ printf("comedi_do_insn returned 0, good\n");
+ }else{
+ printf("E: comedi_do_insn returned %d\n",ret);
+ }
+
+ return 0;
+}
+
int test_info(void);
int test_mode0_read(void);
int test_insn_read(void);
+int test_insn_read_0(void);
int test_insn_read_time(void);
int test_cmd_no_cmd(void);
int test_cmd_probe_src_mask(void);
{ "info", test_info, TEST_STD },
{ "mode0_read", test_mode0_read, TEST_NEVER },
{ "insn_read", test_insn_read, TEST_STD },
+ { "insn_read_0", test_insn_read_0, TEST_STD },
{ "insn_read_time", test_insn_read_time, TEST_STD },
{ "cmd_no_cmd", test_cmd_no_cmd, TEST_STD },
{ "cmd_probe_src_mask", test_cmd_probe_src_mask, TEST_STD },