- From: Alex Fielding <afielding_at_adelphia.net>
- Date: Sat, 6 Mar 2004 22:01:16 -0500
I am using cmd (comedi 0.7.67) to initiate a continuous A/D acquisition in an RTLinux (3.1) kernel module (with the ni_pcimio driver and a National Instruments PCI-MIO-16E-1 board). After some review of the list I've managed to successfully read the preallocated buffer (by first performing a comedi_map(), cmd.data=NULL, and cmd.data_len=map_size*sizeof(sampl_t)), but I am still unclear on the best way to periodically read and flush out the buffer contents. I have seen several posts to this mailing list indicating that get_buffer_contents, get_buf_head_pos, and get_buffer_offset do not return the number of bytes transferred when called on the kernel side (kcomedilib) (in my test program I get values of zero returned all the time). I also have seen references to calling mite driver routines and minimum block sizes for the dma transfers but I am not entirely clear on what's happening there. Will someone explain? I need to know the number of bytes transferred accurately. When running continuous acquisition in user-space we call get_buffer_contents and mark_buffer_read. How can I accomplish the similar task in the real-time kernel module? Alex
Received on 2004-03-07Z03:01:16