Re: Output state handling in 8255 driver

On Monday 14 February 2005 07:36 am, Ian Abbott wrote:
> Hi,
>
> After using comedi_dio_config (INSN_CONFIG) on a DIO subdevice managed
> by the 8255 driver, the 8255 chip sets all its output lines to 0 but the
> copy of the output state saved by the 8255 driver in the 'state' member
> remains unchanged.
>
> Would it be better if:
>
> (i) the 8255 driver zeroed its output state when configuring the i/o
> directions, or
> (ii) the 8255 driver rewrote its current output state to the chip when
> the i/o directions have changed?

I think the first option is better, since it makes more clear to the user 
that something bad has happened.  If the driver rewrites the output state, 
it still won't prevent a transient glitch on the output, which could cause 
people problems.

-- 
Frank

Received on 2005-02-17Z23:35:32