[Lcdproc] use lpt hd44780 on usb lpt addapter ?

Peter Marschall peter@adpm.de
Thu Feb 8 21:37:02 2007


On Sunday, 4. February 2007 21:47, Stefan Herdler wrote:
> NA NABOO wrote:
> > /dev/usb/lp0 instead of 0x378 ?
>
> LCDProc controls the parallel-port directly via direct IO calls. So the
> port address (like 0x378) of the parallel-port is needed.
>
> Last year there was a attempt to switch to /dev/parportX and ioctl() but
> it had been canceled. Afaik problems with the multi-platform stuff but I
> don't know it exactly.

I admit, one of the main issues of the ppdev patch was that
instead of using functions with parameters, it defined variables
in a struct and used them later in the called function.

I.e.
  port->control = 3
  set_control(porthandle);

and in set_control() something like:
  ioctl(porthandle, port->control)

IMHO it is in those cases cleaner to have
  set_control(porthandle, 3);
as it does makes everything explicit and does not use implicit parameter 
passing using structs or objects.

BTW the current ioport functions (whgich are an abstraction as well) use the 
latter form.

But the idea of rewriting that part is not dead, since in the long run, it is 
the clean way to go: multi architecture support, ...
Unfortunately for me the rewrite is of fairly low priority, as I do not have
a display connected to the parallel port.

So, any help is welcome.

> > have not touched Linux since red hat 5.2 ... lots has changed ... been
> > playing with an NSLU2
> > Debian etch rc1 and dug out my old home made hd44780-to-lpt (with
> > 20x4) and my usb-to-lpt adapter ... can anyone point me in the right
> > direction to link the hd44780 driver to /dev/usb/lp0
>
> A usb-to-lpt adapter won't work, sorry.

You might want to try the i2c connection type of the hd44780 driver
IIRC it was written by someone with a SLUG.

Peter
-- 
Peter Marschall
peter@adpm.de