- From: David Schleef <ds_at_schleef.org>
- Date: Sat, 9 Nov 2002 17:02:39 -0800
On Sat, Nov 09, 2002 at 10:54:22PM +0100, Michal Dobes wrote:
> David Schleef wrote:
> > > It is possible to just load the waveform to the buffer and let it run in a
> > > loop?
> >
> > I defined a way to load samples into a on-board FIFO and loop
> > through them using a configuration instruction. Or rather,
> > I documented that it should be done this way, since it isn't
> > actually implemented anywhere.
>
> Why not define for this something into cmd->stop_src?
> For example:
> cmd->stop_src=TRIG_COUNT|TRIG_LOOP;
> cmd->stop_arg=100;
>
> The applicatiion upload 100 scans of the data and card will
> send out these data in neverending cycle? comedi_cancel()
> will stop it.
One reason I chose a configuration instruction is because commands
get cancelled when the device file is closed. The configuration
instruction would be like a regular output instruction, except
that the output would be a waveform instead of a constant value.
This was under the assumption that the board could output a
waveform without any driver intervention.
Howevr, implementing it using a command would make it fit in
better with most devices, and also could be implemented on devices
that don't natively handle waveform output. It makes more sense
to use a command flag, e.g., CMDF_LOOP or CMDF_RESTART. ("restart"
because you are restarting the command but bypassing the start
condition.)
A command flag is also something that could almost be completely
handled in the core, with drivers overriding if the board has native
waveform output.
dave...
Received on 2002-11-10Z01:02:39