return async->buf_write_count;
}
+int comedi_get_buffer_contents( comedi_t *d, unsigned int subdevice )
+{
+ comedi_device *dev = (comedi_device *)d;
+ comedi_subdevice *s = dev->subdevices + subdevice;
+ comedi_async *async;
+
+ if( subdevice > dev->n_subdevices ) return -1;
+ async = s->async;
+ if(async == NULL) return 0;
+
+ return async->buf_write_count - async->buf_read_count;
+}
+
/*
* ALPHA
*/
return 0;
}
+int comedi_mark_buffer_read( comedi_t *d, unsigned int subdevice,
+ unsigned int num_bytes )
+{
+ comedi_device *dev = (comedi_device *)d;
+ comedi_subdevice *s = dev->subdevices + subdevice;
+ comedi_async *async;
+
+ if( subdevice > dev->n_subdevices ) return -1;
+ async = s->async;
+ if( async == NULL ) return -1;
+
+ 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;
EXPORT_SYMBOL(comedi_get_buffer_size);
//EXPORT_SYMBOL(comedi_get_max_buffer_size);
//EXPORT_SYMBOL(comedi_set_buffer_size);
+EXPORT_SYMBOL(comedi_get_buffer_contents);
/* low-level stuff */
//EXPORT_SYMBOL(comedi_trigger);
EXPORT_SYMBOL(comedi_poll);
/* buffer configuration */
+EXPORT_SYMBOL(comedi_mark_buffer_read);
//EXPORT_SYMBOL(comedi_get_range);
EXPORT_SYMBOL(comedi_get_len_chanlist);
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);
+int comedi_get_buffer_size(comedi_t *dev,unsigned int subdev);
+int comedi_mark_buffer_read( comedi_t *dev, unsigned int subdevice,
+ unsigned int num_bytes );
+int comedi_get_buffer_contents( comedi_t *dev, unsigned int subdevice );