[Lcdproc] CwLnx display corruption - possible cause and fix

Dave Liquorice Dave Liquorice" <allsorts@howhill.com
Mon Apr 30 19:39:01 2007


On Mon, 30 Apr 2007 11:18:10 -0700 (PDT), Dave Platt wrote:

> The problem is this:  LCDd knows the speed at which it wants to talk with
> the device (since that information is in the config file), and it has
> full control over its side of the connection, via the Linux serial
> port driver ioctls.  Unfortunately, it does not know what speed the device 
> is currently configured for, 

So the init part of the driver just sends the command to set the display to 
the speed that LCDd wants it to be, a single operation rather than two.

Your sending the opposite of the config then the config shouldn't be 
reliable in all cases if the commands are mis-interpreted when sent at the 
wrong (for the hardware) speed. You're making the false assumption that the 
hardware is not matching the config when it may well be.

As the set/reset method *is* reliable it indicates that speed change 
commands sent at the "wrong" speed are interpreted correctly so you may as 
well just send the one the config calls for... Indeed they pretty much have 
to be interpreted correctly otherwise how does any application set up the 
device how it wants it? Catch 22...

It is never safe to assume the state of any hardware, if a particular state 
is required it must be explicitly configured.

Cheers
Dave.