int ret;
unsigned int flags = comedi_get_subdevice_flags(device,subdevice);
- if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
+ if(!(flags&SDF_CMD) || (comedi_get_read_subdevice(device)!=subdevice)){
printf("not applicable\n");
return 0;
}
{
num_bytes = num_samples * sizeof(sampl_t);
}
- if(!(flags&SDF_CMD) || !(flags&SDF_WRITEABLE)){
+ if(!(flags&SDF_CMD) || (comedi_get_write_subdevice(device)!=subdevice)){
printf("not applicable\n");
return 0;
}
printf(" not supported\n");
return 0;
}
+ cmd.flags |= CMDF_WRITE;
if(realtime)cmd.flags |= TRIG_RT;
cmd.chanlist = chanlist;
int len;
unsigned int flags = comedi_get_subdevice_flags(device,subdevice);
- if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
+ if(!(flags&SDF_CMD) || (comedi_get_read_subdevice(device)!=subdevice)){
printf("not applicable\n");
return 0;
}
unsigned int flags;
flags = comedi_get_subdevice_flags(device,subdevice);
- if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
+ if(!(flags&SDF_CMD) || (comedi_get_read_subdevice(device)!=subdevice)){
printf("not applicable\n");
return 0;
}
flags = comedi_get_subdevice_flags(device,subdevice);
- if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
+ if(!(flags&SDF_CMD) || (comedi_get_read_subdevice(device)!=subdevice)){
printf("not applicable\n");
return 0;
}
unsigned int flags;
flags = comedi_get_subdevice_flags(device,subdevice);
- if(!(flags&SDF_CMD) || flags&SDF_WRITEABLE){
+ if(!(flags&SDF_CMD) || (comedi_get_read_subdevice(device)!=subdevice)){
printf("not applicable\n");
return 0;
}