Re: Extra 8254 config commands

On 05/09/2005 14:32, Frank Mori Hess wrote:
> On Monday 05 September 2005 08:26 am, Ian Abbott wrote:
> 
>>Another feature of the cards is that they have software programmable
>>routing of the clock and gate inputs of the 8254 counter channels, so
>>I'd like to add a couple of config commands to program these.  Suggested
>>names for the config commands:
>>
>>   INSN_CONFIG_8254_SET_GATE
>>   INSN_CONFIG_8254_SET_CLOCK
> 
> I don't see any reason to make the names refer to the 8254, the ideas are 
> not specific to the 8254, and might also be used eventually for other 
> counters or other types of subdevices.  I'd prefer
> 
> INSN_CONFIG_SET_GATE_SRC
> INSN_CONFIG_SET_CLOCK_SRC

Okey-dokey.

> Also,
> 
> INSN_CONFIG_GET_GATE_SRC
> INSN_CONFIG_GET_CLOCK_SRC
> 
> might be useful.

Okay, I'm easy with that.  I had considered this previously but decided 
it probably wouldn't be very useful as the application would just set 
them up as it required.

>>Suggested use of the comedi_insn structure:
>>
>>   .insn = COMEDI_CONFIG
>>   .n = 2
>>   .data[0] = INSN_CONFIG_8254_SET_GATE or INSN_CONFIG_8254_SET_CLOCK
>>   .data[2] = clock or gate value
>>   .chanspec = 0, 1 or 2 (the counter channel)
> 
> You made a typo, that should be data[1] instead of data[2].  Otherwise, it 
> looks fine to me.

I originally had the counter channel in data[1] until I realized this 
was wrong.  That explains the hole I left behind by mistake!

Is it okay to add Amplicon-specific data values for the clock and gate 
sources to comedi.h?

-- 
-=( 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 2005-09-06Z08:25:22