Re: Design of instructions for Counter/Timer subdevices...

I made an error (at least one :-) in my design document: in the
INSN_CONFIG instruction to configure a counter, I used the data[0]
field as already an argument field for the particular configuration
mentioned in the "insn" field.  But of course, this "insn" field
contains "INSN_CONFIG", and it is "data[0]" that should contain the
requested configuration type...

Anyway, I think the double use of the instruction function leads to
too many misunderstandings. Already now, configuration instructions
misuse the "data" fields, because their type is lsampl_t. Not really a
good situation...

Giving counters their own data structure requires a change of the
Comedi API, but it would be a good occasion to get rid of the
"chanspec" integer; in fact, this integer is already a mini
data-structure forced into 32 bits. Giving each channel a real
configuration data structure would make things much more
understandable, I think. At the same time, a new configuration
function should be introduced: comedi_channel_config(), for example.

Herman

-- 
  K.U.Leuven, Mechanical Engineering, Robotics Research Group
<http://people.mech.kuleuven.ac.be/~bruyninc> Tel: +32 16 322480

Received on 2003-04-11Z16:56:26