new options for hd44780 (Frank Jepsen)

This commit is contained in:
marschap
2007-02-04 12:26:54 +00:00
parent e83ebd272f
commit 88acd72197
6 changed files with 72 additions and 2 deletions
+6
View File
@@ -175,6 +175,7 @@ Lucian Muresan:
Matteo Pillon:
- lcdserializer connectiontype to the hd44780 driver
- various improvements to the serial connections of the hd44780 driver
Laurent Arnal:
- connectiontype for LIS2 displays from VLSystem (http://www.vlsys.co.kr)
@@ -211,6 +212,11 @@ Benjamin Wiedmann
- Added functionality for HITACHI SP14Q002 gLCD (320x240)
- Implemented dynamic wiring scheme selection for SED1330 driver ("ConnectionType")
Frank Jepsen
- vdr-wakeup support in hd44780 driver (originally for v0.4.5)
- new options for the hd44780 driver
Further developers in the sourceforge lcdproc team:
Mindaugas Idzelis aim4min
Andre Burton andreb
+2 -1
View File
@@ -27,8 +27,9 @@ v.0.5dev (ongoing development)
+ Hitachi SP14Q002 support & ConnectionType setting for sed1330 (Benjamin Wiedmann)
* replace obsolete index() by strchr() (Guillaume LECERF)
* fixes for CwLinux driver (Gideon Tsang)
+ new ConnectionType vdr-wakeup in hd44780 driver
+ new ConnectionType vdr-wakeup in hd44780 driver (originally Frank Jepsen)
* fixes for the hd44780-serial drivers (Matteo Pillon)
+ new options for the hd44780 driver (Frank Jepsen)
v.0.5.1
+ config file support in lcdproc client (Andrew Foss)
+10
View File
@@ -438,6 +438,16 @@ Charmap=hd44780_default
# to increase the delays. Default: 1.
#DelayMult=2
# Some displays (e.g. vdr-wakeup) need a message from the driver to that it
# is still alive. When set to a value bigger then null the character in the
# upper left corner is updated every <KeepAliveDisplay> seconds. Default: 0.
#KeepAliveDisplay=0
# If you experience occasional garbage on your display you can use this
# option as workaround. If set to a value bigger than null it forces a
# full screen refresh <RefreshDiplay> seconds. Default: 0.
#RefreshDisplay=5
# You can reduce the inserted delays by setting this to false.
# On fast PCs it is possible your LCD does not respond correctly.
# Default: true.
+26
View File
@@ -1924,6 +1924,32 @@ can be done by specifying "--enable-drivers=all" or by
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<command>KeepAliveDisplay=</command>
<arg choice="plain"><replaceable>SECONDS</replaceable></arg>
</term>
<listitem><para>
Some displays (e.g. <emphasis>vdr-wakeup</emphasis>) need a message from the driver to that it
is still alive. When set to a value bigger then <literal>0</literal> the character in the
upper left corner is updated every <replaceable>SECONDS</replaceable> seconds.
Default: <literal>0</literal>.
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<command>RefreshDisplay=</command>
<arg choice="plain"><replaceable>SECONDS</replaceable></arg>
</term>
<listitem><para>
If you experience occasional garbage on your display you can use this
option as workaround. If set to a value bigger than <literal>0</literal> it forces a
full screen refresh <replaceable>SECONDS</replaceable> seconds.
Default: <literal>0</literal>.
</para></listitem>
</varlistentry>
<varlistentry>
<term>
<command>KeyMatrix_4_1=</command>
+6
View File
@@ -117,6 +117,12 @@ typedef struct driver_private_data {
int backlight_bit;
// force full refresh of display
time_t nextrefresh;
int refreshdisplay; // When >0 make a full display update every <refreshdisplay> seconds
time_t nextkeepalive;
int keepalivedisplay; // When >0 refresh upper left char every <keepalivedisplay> seconds to keep display alive
int output_state; // what was most recently output to the output port
} PrivateData;
+22 -1
View File
@@ -161,6 +161,11 @@ HD44780_init (Driver * drvthis)
p->delayBus = drvthis->config_get_bool( drvthis->name, "delaybus", 0, 1 );
p->lastline = drvthis->config_get_bool( drvthis->name, "lastline", 0, 1 );
p->nextrefresh = 0;
p->refreshdisplay = drvthis->config_get_int( drvthis->name, "refreshdisplay", 0, 0 );
p->nextkeepalive = 0;
p->keepalivedisplay = drvthis->config_get_int( drvthis->name, "keepalivedisplay", 0, 0 );
// Get and search for the connection type
s = drvthis->config_get_string( drvthis->name, "ConnectionType", 0, "4bit" );
for (i = 0; connectionMapping[i].name != NULL && strcmp (s, connectionMapping[i].name) != 0; i++);
@@ -511,6 +516,22 @@ HD44780_flush (Driver *drvthis)
int row;
int i;
int count;
char refreshNow = 0;
char keepaliveNow = 0;
// force full refresh of display
if ((p->refreshdisplay > 0) && (time(NULL) > p->nextrefresh))
{
refreshNow = 1;
p->nextrefresh = time(NULL) + p->refreshdisplay;
}
// keepalive refresh of display
if ((p->keepalivedisplay > 0) && (time(NULL) > p->nextkeepalive))
{
keepaliveNow = 1;
p->nextkeepalive = time(NULL) + p->keepalivedisplay;
}
// Update LCD incrementally by comparing with last contents
count = 0;
@@ -518,7 +539,7 @@ HD44780_flush (Driver *drvthis)
drawing = 0;
for (x = 0 ; x < wid; x++) {
ch = p->framebuf[(y * wid) + x];
if ( ch != p->lcd_contents[(y*wid)+x] ) {
if ( refreshNow || (x + y == 0 && keepaliveNow) || ch != p->lcd_contents[(y*wid)+x] ) {
if ( !drawing || x % 8 == 0 ) { // x%8 is for 16x1 displays !
drawing = 1;
HD44780_position(drvthis,x,y);