Re: comedi_rt_timer

Le mercredi 23 février 2005 à 12:11 +0000, Ian Abbott a écrit :
> On 23/02/05 08:56, Emmanuel PACAUD wrote:
> > In comedi_rt_timer driver, start src must be TRIG_INT for analog output,
> > and TRIG_NOW for all other emulated subdevices.
> > 
> > And I don't understand why...
> > 
> > Could someone with more knowledge than me about comedi explain such a
> > limitation ?
> 
> Using TRIG_INT allows you to write data to the device before starting 
> the acquisition.  If TRIG_NOW was used, there might not be any data 
> available for the first scan or the first conversion, in which case an 
> underrun error would be reported.

Yes.

> The Comedilib documentation mentions TRIG_FOLLOW as a possible start_src 
> for an output subdevice.  This says that the acquisition should start 
> when data is written to the buffer.  However, it's not supported yet :-(

I tried to adapt comedi_rt_timer in order to enable TRIG_FOLLOW, and it
seems to work for me.

Here's the resulting patch, though I'm not very confident about its
robustness.

	Emmanuel.

Received on 2005-02-23Z14:20:18