if (s->maxdata_list)
return s->maxdata_list[chan];
-
+
return s->maxdata;
}
} else {
ret=s->range_table->length;
}
-
+
ret=ret|(dev->minor<<28)|(subdevice<<24)|(chan<<16);
return ret;
} else {
ret=s->range_table->length;
}
-
+
return ret;
}
unsigned int num_bytes;
async = s->async;
+ if( async == NULL ) return -1;
num_bytes = buf_user_count - async->buf_read_count;
comedi_buf_read_free( async, num_bytes );
return 0;
}
+int comedi_get_buffer_size(comedi_t *d,unsigned int subdev)
+{
+ comedi_device *dev = (comedi_device *)d;
+ comedi_subdevice *s = dev->subdevices + subdev;
+ comedi_async *async;
+
+ if( subdev >= dev->n_subdevices ) return -1;
+ async = s->async;
+ if(async == NULL) return 0;
+
+ return async->prealloc_bufsz;
+}
unsigned int buf_user_count);
int comedi_map(comedi_t *dev, unsigned int subdev, void *ptr);
int comedi_unmap(comedi_t *dev, unsigned int subdev);
+int comedi_get_buffer_size(comedi_t *it,unsigned int subdev);