Re: Output state handling in 8255 driver

On Thu, Feb 17, 2005 at 06:35:32PM -0500, Frank Mori Hess wrote:
> 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.

You're supposed to be able to write an output state to a DIO
device that is configured to input.  When reconfigured for
output, the driver should change the lines from high-impedance
to the preset state.



dave...

Received on 2005-02-18Z14:48:46