aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-04-17 08:10:42 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-04-17 08:10:42 +0000
commit7c7a226d710eebbcb77e42fb1804ffd84e6c8b1c (patch)
tree72fb84d626cfffd75d61af90dc64a7ca428214de
parent61f1df17be9215aa2e2443baa8aa02aca9d09ed0 (diff)
downloadlcd4linux-7c7a226d710eebbcb77e42fb1804ffd84e6c8b1c.tar.gz
[lcd4linux @ 2006-04-17 08:10:42 by reinelt]
LCDLinux patch from Mattia; widget_image moved to EXTRA_SOURCE git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@659 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
-rw-r--r--Makefile.am2
-rw-r--r--Makefile.in10
-rwxr-xr-xconfigure2
-rw-r--r--drivers.m42
-rw-r--r--drv_LCDLinux.c28
5 files changed, 29 insertions, 15 deletions
diff --git a/Makefile.am b/Makefile.am
index 1759787..b52d8a5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,7 +32,6 @@ widget.c widget.h \
widget_text.c widget_text.h \
widget_bar.c widget_bar.h \
widget_icon.c widget_icon.h \
-widget_image.c widget_image.h \
widget_keypad.c widget_keypad.h \
widget_timer.c widget_timer.h \
widget_gpo.c widget_gpo.h \
@@ -88,6 +87,7 @@ drv_WincorNixdorf.c \
drv_X11.c \
\
font_6x8.h \
+widget_image.c widget_image.h \
\
lcd4linux_i2c.h \
\
diff --git a/Makefile.in b/Makefile.in
index 840b2d7..532e382 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -101,10 +101,10 @@ lcd4linux_LDFLAGS =
lcd4linux_LDADD = @DRIVERS@ @PLUGINS@ @DRVLIBS@ @PLUGINLIBS@
lcd4linux_DEPENDENCIES = @DRIVERS@ @PLUGINS@
-lcd4linux_SOURCES = lcd4linux.c cfg.c cfg.h debug.c debug.h drv.c drv.h evaluator.c evaluator.h hash.c hash.h layout.c layout.h pid.c pid.h timer.c timer.h thread.c thread.h udelay.c udelay.h qprintf.c qprintf.h rgb.c rgb.h widget.c widget.h widget_text.c widget_text.h widget_bar.c widget_bar.h widget_icon.c widget_icon.h widget_image.c widget_image.h widget_keypad.c widget_keypad.h widget_timer.c widget_timer.h widget_gpo.c widget_gpo.h plugin.c plugin.h plugin_cfg.c plugin_math.c plugin_string.c plugin_test.c plugin_time.c
+lcd4linux_SOURCES = lcd4linux.c cfg.c cfg.h debug.c debug.h drv.c drv.h evaluator.c evaluator.h hash.c hash.h layout.c layout.h pid.c pid.h timer.c timer.h thread.c thread.h udelay.c udelay.h qprintf.c qprintf.h rgb.c rgb.h widget.c widget.h widget_text.c widget_text.h widget_bar.c widget_bar.h widget_icon.c widget_icon.h widget_keypad.c widget_keypad.h widget_timer.c widget_timer.h widget_gpo.c widget_gpo.h plugin.c plugin.h plugin_cfg.c plugin_math.c plugin_string.c plugin_test.c plugin_time.c
-EXTRA_lcd4linux_SOURCES = drv_generic_text.c drv_generic_text.h drv_generic_graphic.c drv_generic_graphic.h drv_generic_gpio.c drv_generic_gpio.h drv_generic_serial.c drv_generic_serial.h drv_generic_parport.c drv_generic_parport.h drv_generic_i2c.c drv_generic_i2c.h drv_generic_keypad.c drv_generic_keypad.h drv_BeckmannEgle.c drv_BWCT.c drv_Crystalfontz.c drv_Curses.c drv_Cwlinux.c drv_G15.c drv_HD44780.c drv_Image.c drv_LCD2USB.c drv_LCDLinux.c drv_LCDTerm.c drv_LPH7508.c drv_LUIse.c drv_M50530.c drv_MatrixOrbital.c drv_MilfordInstruments.c drv_Noritake.c drv_NULL.c drv_RouterBoard.c drv_Sample.c drv_serdisplib.c drv_SimpleLCD.c drv_T6963.c drv_Trefon.c drv_USBLCD.c drv_WincorNixdorf.c drv_X11.c font_6x8.h lcd4linux_i2c.h plugin_apm.c plugin_cpuinfo.c plugin_diskstats.c plugin_dvb.c plugin_exec.c plugin_file.c plugin_i2c_sensors.c plugin_imon.c plugin_isdn.c plugin_loadavg.c plugin_meminfo.c plugin_mpd.c plugin_mysql.c plugin_netdev.c plugin_pop3.c plugin_ppp.c plugin_proc_stat.c plugin_python.c plugin_sample.c plugin_seti.c plugin_statfs.c plugin_uname.c plugin_uptime.c plugin_wireless.c plugin_xmms.c
+EXTRA_lcd4linux_SOURCES = drv_generic_text.c drv_generic_text.h drv_generic_graphic.c drv_generic_graphic.h drv_generic_gpio.c drv_generic_gpio.h drv_generic_serial.c drv_generic_serial.h drv_generic_parport.c drv_generic_parport.h drv_generic_i2c.c drv_generic_i2c.h drv_generic_keypad.c drv_generic_keypad.h drv_BeckmannEgle.c drv_BWCT.c drv_Crystalfontz.c drv_Curses.c drv_Cwlinux.c drv_G15.c drv_HD44780.c drv_Image.c drv_LCD2USB.c drv_LCDLinux.c drv_LCDTerm.c drv_LPH7508.c drv_LUIse.c drv_M50530.c drv_MatrixOrbital.c drv_MilfordInstruments.c drv_Noritake.c drv_NULL.c drv_RouterBoard.c drv_Sample.c drv_serdisplib.c drv_SimpleLCD.c drv_T6963.c drv_Trefon.c drv_USBLCD.c drv_WincorNixdorf.c drv_X11.c font_6x8.h widget_image.c widget_image.h lcd4linux_i2c.h plugin_apm.c plugin_cpuinfo.c plugin_diskstats.c plugin_dvb.c plugin_exec.c plugin_file.c plugin_i2c_sensors.c plugin_imon.c plugin_isdn.c plugin_loadavg.c plugin_meminfo.c plugin_mpd.c plugin_mysql.c plugin_netdev.c plugin_pop3.c plugin_ppp.c plugin_proc_stat.c plugin_python.c plugin_sample.c plugin_seti.c plugin_statfs.c plugin_uname.c plugin_uptime.c plugin_wireless.c plugin_xmms.c
EXTRA_DIST = lcd4linux.conf.sample lcd4kde.conf lcd4linux.kdelnk lcd4linux.xpm lcd4linux.lsm curses.m4 AUTHORS CREDITS FAQ NEWS TODO README README.Drivers README.Plugins README.KDE plugin_sample.c
@@ -126,9 +126,9 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
lcd4linux_OBJECTS = lcd4linux.o cfg.o debug.o drv.o evaluator.o hash.o \
layout.o pid.o timer.o thread.o udelay.o qprintf.o rgb.o widget.o \
-widget_text.o widget_bar.o widget_icon.o widget_image.o widget_keypad.o \
-widget_timer.o widget_gpo.o plugin.o plugin_cfg.o plugin_math.o \
-plugin_string.o plugin_test.o plugin_time.o
+widget_text.o widget_bar.o widget_icon.o widget_keypad.o widget_timer.o \
+widget_gpo.o plugin.o plugin_cfg.o plugin_math.o plugin_string.o \
+plugin_test.o plugin_time.o
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
diff --git a/configure b/configure
index d55747c..f19e438 100755
--- a/configure
+++ b/configure
@@ -6239,7 +6239,7 @@ for driver in $drivers; do
LCD2USB)
LCD2USB=$val
;;
- LCDLINUX)
+ LCDLinux)
LCDLINUX=$val
;;
LCDTerm)
diff --git a/drivers.m4 b/drivers.m4
index 0687160..66d767b 100644
--- a/drivers.m4
+++ b/drivers.m4
@@ -107,7 +107,7 @@ for driver in $drivers; do
LCD2USB)
LCD2USB=$val
;;
- LCDLINUX)
+ LCDLinux)
LCDLINUX=$val
;;
LCDTerm)
diff --git a/drv_LCDLinux.c b/drv_LCDLinux.c
index 7f2ec5f..8fb7c51 100644
--- a/drv_LCDLinux.c
+++ b/drv_LCDLinux.c
@@ -1,4 +1,4 @@
-/* $Id: drv_LCDLinux.c,v 1.12 2006/01/30 06:25:52 reinelt Exp $
+/* $Id: drv_LCDLinux.c,v 1.13 2006/04/17 08:10:42 reinelt Exp $
*
* driver for the LCD-Linux HD44780 kernel driver
* http://lcd-linux.sourceforge.net
@@ -24,6 +24,9 @@
*
*
* $Log: drv_LCDLinux.c,v $
+ * Revision 1.13 2006/04/17 08:10:42 reinelt
+ * LCDLinux patch from Mattia; widget_image moved to EXTRA_SOURCE
+ *
* Revision 1.12 2006/01/30 06:25:52 reinelt
* added CVS Revision
*
@@ -171,7 +174,7 @@ static int drv_LL_start(const char *section, const int quiet)
{
char *s;
int rows = -1, cols = -1;
- int use_busy = 0, commit = 0;
+ int use_busy = 0, bus4bits = 0, commit = 0;
struct lcd_parameters buf;
/* emit version information */
@@ -202,16 +205,15 @@ static int drv_LL_start(const char *section, const int quiet)
error("%s: Could not query display information!", Name);
return -1;
}
- info("%s: %dx%d display with %d controllers, flags=0x%02x:", Name, buf.cntr_cols, buf.cntr_rows, buf.num_cntr,
- buf.flags);
-
+ info("%s: %dx%d display with %d controllers, flags=0x%02x:",
+ Name, buf.cntr_cols, buf.cntr_rows, buf.num_cntr, buf.flags);
info("%s: busy-flag checking %sabled", Name, buf.flags & HD44780_CHECK_BF ? "en" : "dis");
info("%s: bus width %d bits", Name, buf.flags & HD44780_4BITS_BUS ? 4 : 8);
info("%s: font size %s", Name, buf.flags & HD44780_5X10_FONT ? "5x10" : "5x8");
- /* overwrite with size from lcd4linux.conf */
+ /* overwrite width size from lcd4linux.conf */
if ((rows > 0 && rows != buf.cntr_rows) || (cols > 0 && cols != buf.cntr_cols)) {
info("%s: changing size to %dx%d", Name, cols, rows);
buf.cntr_rows = rows;
@@ -234,6 +236,18 @@ static int drv_LL_start(const char *section, const int quiet)
commit = 1;
}
+ /* overwrite bus length from lcd4linux.conf */
+ cfg_number(section, "Bus4Bit", 0, 0, 1, &bus4bits);
+ if (bus4bits && !(buf.flags & HD44780_4BITS_BUS)) {
+ info("%s: setting bus length to 4 bits", Name);
+ buf.flags |= HD44780_4BITS_BUS;
+ commit = 1;
+ } else if (!bus4bits && (buf.flags & HD44780_4BITS_BUS)) {
+ info("%s: setting bus length to 8 bits", Name);
+ buf.flags &= ~HD44780_4BITS_BUS;
+ commit = 1;
+ }
+
if (commit && ioctl(lcdlinux_fd, IOCTL_SET_PARAM, &buf) != 0) {
error("%s: ioctl(IOCTL_SET_PARAM) failed: %s", Name, strerror(errno));
return -1;
@@ -297,7 +311,7 @@ int drv_LL_init(const char *section, const int quiet)
int asc255bug;
int ret;
- info("%s: %s", Name, "$Revision: 1.12 $");
+ info("%s: %s", Name, "$Revision: 1.13 $");
/* display preferences */
XRES = 5; /* pixel width of one char */