Re: extra board specific functions

Thanks for the advice, I found the INSN_CONFIG, and could make it
work. I have some design questions, though.

My board is a DAC6703, using and already extended driver (cb_pcidda,
not the version that comes with Comedi at this point). The function
I'm trying to implement, is that the AO channels can have two update
modes: updating automatically when a new output is set, and updating
upon a trigger (which is writing to a specific register).

Do I think it right, that when I'm setting the update mode with the
INSN_CONFIG, the "data" input should be an array with length of at
least two: the data[0] telling that what kind of config it is, and for
example data[1] is the variable of the mode for the specific channel?
I think this, because the check_insn_conig_length complained about my
input and I've seen there the different types of config settings
comedi checks at this point. Should I try to use one of the config
modes that are already set, or make up a new number? For example find
a number number not in use and make it CONFIG_AO_UPDATE_MODE (or
somethings similar). None of the already existing modes really cover
what I'm trying to do... (Maybe CONFIG_ANALOG_TRIG is a bit closer,
but probably it is used for totally different thing with other
boards).

And also, when I'm doing the update trigger, writing to that specific
register, is it more logical to place the code of the update together
with the INSN_CONFIG, (like CONFIG_DO_AO_UPDATE) or should it be
merged with the INSN_WRITE, as a special mode?

Probably checking the drivers of other boards that have similar
function, would enlighten me, but unfortunately I don't really know
many other boards yet...

Cheers,
     Greg


On 14/08/07, Ian Abbott <abbotti_at_mev.co.uk> wrote:
> On 14/08/2007 00:29, Gergely Imreh wrote:
> >   Is there a proper way to implement any extra, board specific
> > function? Or should I have a workaround, like calling INSN_WRITE
> > instruction with some parameters, when it is setting the board,
> > instead of setting the output?  This latter might work, but it doesn't
> > feel to be the right way at all....
>
> You're on the right track, but you should use INSN_CONFIG for these
> board-specific hacks, not INSN_WRITE.
>
> --
> -=( Ian Abbott _at_ MEV Ltd.    E-mail: <abbotti_at_mev.co.uk>        )=-
> -=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
>

Received on 2007-08-18Z11:10:50