From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <445E68C0.7060404@domain.hid> Date: Sun, 07 May 2006 23:38:08 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Xenomai-help] RTDM driver questions References: <050720061514.21865.445E0ED2000D33230000556922058863609C0E0301089BD2040A969B0799@domain.hid> In-Reply-To: <050720061514.21865.445E0ED2000D33230000556922058863609C0E0301089BD2040A969B0799@domain.hid> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig32BA0623FA9A66F474165330" Sender: jan.kiszka@domain.hid List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: witzel.thomas@domain.hid Cc: xenomai@xenomai.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig32BA0623FA9A66F474165330 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable witzel.thomas@domain.hid wrote: > Hello All, >=20 > I'm working on a RTDM driver for a PCMCIA DAQ card. I have already impl= emented=20 > all the basic infrastructure, some ioctls for setting the sampling rate= and=20 > interrupt sources and have also implemented the interrupt handling (the= re is=20 > some issues with the irqs that I might ask about later).=20 > My question is how to best give the data from the driver to the user sp= ace data=20 > acquisition program. Should I allocate some kernel space and mmap it to= the user=20 > address space and then use a signal of some kind to inform the user spa= ce=20 > application when the space is half full ? Any suggestions how this is b= est done=20 > are welcome. Already had a look at the interfaces comedi provides for this? Do you know of Alexis' ongoing effort to port comedi over RTDM? There is some code in the Xenomai SVN as a branch. I'm not up-to-date with its development, but if you are interested, I guess Alexis will be happy to comment on this. Generally spoken, mmap can make sense if you have a significant amount of data to transfer, not "just" a few kbyte/s. RTDM has the elementary support for such device interfaces now, and this has already been used for a frame-grabbing driver. >=20 > Also I'm using now a clock on the DAQ card to trigger an interrupt at w= hich I=20 > read the samples of the card. The card itself (ancient) has only a very= small=20 > FIFO and I also want to do some DIO on the PCs parallel port for each s= ample=20 > that I read from the DAQ card, so thats why I decided for this design. = Would it=20 > be better to use a timer from xenomai to do the sample clocking rather = than an=20 > irq generated by the clock on the DAQ card (performance or otherwise) ?= The on-board timers surely have lower jitters than software-driven timers can provide. Depending on your application, this can make a difference. On the other hand, application-driven acquisition timing can be easier to implement (less synchronisation issues). Again, I would suggest a look at comedi if and how such capabilities are used there. Jan --------------enig32BA0623FA9A66F474165330 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEXmjAniDOoMHTA+kRAs5fAJ9g9GCTS3wYncLZlFK1UPBegDeO1gCggSWZ Zen5NsVVgFEppd5/9XRpgfk= =wZWH -----END PGP SIGNATURE----- --------------enig32BA0623FA9A66F474165330--