Hi there,
sorry if you get this message twice. I'm reposting it because I did not
receive a copy myself, and I posted to the wrong email-adress...
So here it goes:
I implemented a new "parallel port abstraction scheme" into lcd4linux.
This new feature is only available in CVS at the moment, as I'm looking
for some testers.
First I want to thank Thomas 'Silvo' Volkert for having this idea.
What's this abstraction layer:
- for the user: you can specify the wiring in the config file. This way
it's possible to run lcd4linux with almost all wirings out there
(WinAmp, lcdproc, ...)
For HD44780, just specify the following lines in lcd4linux.conf:
Wire.RW "GND"
Wire.RS "AUTOFD"
Wire.ENABLE "STROBE"
Wire.GPO "INIT"
This would be the traditional lcd4linux wiring scheme (which will be
used as a default if you don't specify any wiring in the config file).
Another example would be the WinAmp style:
Wire.RW "AUTOFD"
Wire.RS "INIT"
Wire.ENABLE "STROBE"
Wire.GPO "GND"
- for the developer: it hides all the inb()/outb()/ppdev() stuff from
the driver itself, lets you specify your own names for the control
signals, and takes care of the inverting of several signals (so you dont
have to invert-invert-invert your thoughts :-)
as an example, the HD44780 "send command" function looks that easy:
static void HD_command (unsigned char cmd, int delay)
{
// put data on DB1..DB8
parport_data (cmd);
// clear RW and RS
parport_control (SIGNAL_RW | SIGNAL_RS, 0);
// Address set-up time
ndelay(40);
// send command
// Enable cycle time = 230ns
parport_toggle (SIGNAL_ENABLE, 1, 230);
// wait for command completion
udelay(delay);
}
this new scheme is implemented for the following drivers: HD44780,
M50530 and T6963
Please test and report!
TIA, Michael
--
netWorks Vox: +43 316 698260
Michael Reinelt Fax: +43 316 692343
Geisslergasse 4 GSM: +43 676 3079941
A-8045 Graz, Austria e-mail: re...@eu...
|