- From: M. Koehrer <mathias_koehrer_at_arcor.de>
- Date: Mon, 6 Nov 2006 17:04:05 +0100 (CET)
Hi everybody I have scanned through all the comedi sources and I have one question concerning the issue I have asked before: When I understand the command things right, the analog in data is transferred via DMA to the async->prealloc_buf. I found out that the data will be written to prealloc_buf. My question is now: Where in the comedi code is the data transferred from prealloc_buf to the user address space? In "standard" (non realtime) comedi this is happens in comedi_fops.c (function comedi_read). I have not found a corresponding code that can do this for RTAI LXRT. Thanks a lot Mathias > > On Monday 06 November 2006 13:14, M. Koehrer wrote: > > Hi everybody, > > > > I am trying to use the comedi commands using RTAI (RTAI 3.3CV, latest > > comedi/comedilib). On the RTAI CVS I have found an (old?) example testa.c > > that I used as base. (see attached testa.c). > > The program testa sets up a command to sample from the first AIN channel > > a couple of times. > > The test compiles and runs (10 lines are printed out), however the data > > value is always 0. > > I have debugged into the driver (I use a simple PCI NI 6024-E) and I > found > > out that the data is transferred correctly via DMA to the async > > prealloc_buf. It seams as the only thing that misses is the transfer from > > the internal (kernel space) memory that holds the input values (written > by > > DMA) to the user space value. > > > > One strange thing that I have detected was the following: > > The function rt_comedi_alloc_cmd() sets internally the values of > cmd->data > > and cmd->chanlist and returns the values in the arguments **chanlist and > > **data. However, when testa returns from comedi_command_test() the value > of > > cmd->data has changed - it points now somewhere in a 0xexxxxxxx address > > space. Could this be an issue? > > > > Is there somewhere a running example available that shows working comedi > > commands with RTAI? > > > > Thanks for any help on this issue. > > > > Mathias > > -- -- Mathias Koehrer mathias_koehrer_at_arcor.de Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT JETZT bei Arcor: günstig und schnell mit DSL - das All-Inclusive-Paket für clevere Doppel-Sparer, nur 44,85 € inkl. DSL- und ISDN-Grundgebühr! http://www.arcor.de/rd/emf-dsl-2
Received on 2006-11-06Z16:04:05