int go;
int total=0;
int ret;
+ unsigned int flags = comedi_get_subdevice_flags(device,subdevice);
- if(!(comedi_get_subdevice_flags(device,subdevice)&SDF_CMD)){
+ if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
printf("not applicable\n");
return 0;
}
int test_cmd_fifo_depth_check(void)
{
int len;
+ unsigned int flags = comedi_get_subdevice_flags(device,subdevice);
- if(!(comedi_get_subdevice_flags(device,subdevice)&SDF_CMD)){
+ if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
printf("not applicable\n");
return 0;
}
int go;
int total=0;
int ret;
+ unsigned int flags;
- if(!(comedi_get_subdevice_flags(device,subdevice)&SDF_CMD)){
+ flags = comedi_get_subdevice_flags(device,subdevice);
+ if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
printf("not applicable\n");
return 0;
}
device = comedi_open(filename);
if(!device){
printf("E: comedi_open(\"%s\"): %s\n",filename,strerror(errno));
- exit(0);
+ exit(1);
}
print_device_info();
int ret;
void *b, *adr;
sampl_t *map;
+ unsigned int flags;
- if(!(comedi_get_subdevice_flags(device,subdevice)&SDF_CMD)){
+ flags = comedi_get_subdevice_flags(device,subdevice);
+
+ if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
printf("not applicable\n");
return 0;
}
int length=100000;
fd_set rdset;
struct timeval timeout;
+ unsigned int flags;
- if(!(comedi_get_subdevice_flags(device,subdevice)&SDF_CMD)){
+ flags = comedi_get_subdevice_flags(device,subdevice);
+ if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
printf("not applicable\n");
return 0;
}