Extra 8254 config commands

Hello Dave, Frank et al,

I'm planning to expand my amplc_dio200 driver to support some other 
cards in the same series.  These all have 8254 counters which I'm 
planning to implement as standalone subdevices like the das08 driver.

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

These are extrinsic config commands, not intrinsic to the 8254 like the 
other two (INSN_CONFIG_8254_SET_MODE and INSN_CONFIG_8254_READ_STATUS). 
  I'd have to make that clear in the comedi.h header file.

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)

The actual values are consistent across the range, but are likely to be 
highly specific to the Amplicon cards, so I don't think it's worth 
defining any generic macro constants for these.  Would it be okay to put 
Amplicon-specific macro constants in the comedi.h file or should I just 
leave the application programmer to use magic numbers?

Any comments on the above?

Cheers,
Ian.

-- 
-=( 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-05Z11:26:14