aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-08-10 19:06:52 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2006-08-10 19:06:52 +0000
commite28d0cad12698102e3e9ce200cd79f57f9fcf3a6 (patch)
treea564f4c972a002d6882b7f2fd2f5603eaaf9611d
parentccf39796a1c59b0dec4b030a5791b71246e77e64 (diff)
downloadlcd4linux-e28d0cad12698102e3e9ce200cd79f57f9fcf3a6.tar.gz
[lcd4linux @ 2006-08-10 19:06:52 by reinelt]
new 'fuzz' parameter for timings git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@686 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
-rw-r--r--lcd4linux.conf.sample24
-rw-r--r--udelay.c20
2 files changed, 38 insertions, 6 deletions
diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample
index 884eb84..6a76170 100644
--- a/lcd4linux.conf.sample
+++ b/lcd4linux.conf.sample
@@ -157,6 +157,8 @@ Display HD44780-winamp {
POWER 'GND'
}
Timing {
+ # fuzz timings by value (100 = no change)
+ fuzz 100
# low-level communication [ns]
CY 1000 # Enable cycle time
PW 450 # Enable pulse width
@@ -178,6 +180,23 @@ Display HD44780-winamp {
}
}
+# HD44780 display 4-Bit mode
+Display HD44780-4bit {
+ Driver 'HD44780'
+ Model 'generic'
+ Port '/dev/parports/0'
+ Size '16x1'
+ Bits 4
+ UseBusy 0
+ asc255bug 0
+ Wire {
+ RW 'GND'
+ RS 'DB4'
+ ENABLE 'DB6'
+ GPO 'GND'
+ }
+}
+
# Dual-HD44780 display from Pollin
Display WDC2704M {
Driver 'HD44780'
@@ -1033,6 +1052,7 @@ Layout testMySQL {
#Display 'CW12232'
#Display 'HD44780-generic'
#Display 'HD44780-WinAmp'
+#Display 'HD44780-4bit'
#Display 'WDC2704M'
#Display 'SC1602D'
#Display 'LCM-162'
@@ -1040,7 +1060,7 @@ Layout testMySQL {
#Display 'CF632'
#Display 'CF633'
#Display 'Curses'
-#Display 'M50530-24x8'
+Display 'M50530-24x8'
#Display 'LCDTerm'
#Display 'SimpleLCD'
#Display 'BA63'
@@ -1051,7 +1071,7 @@ Layout testMySQL {
#Display 'BWCT'
#Display 'Image'
#Display 'Trefon'
-Display 'LCD2USB'
+#Display 'LCD2USB'
#Display 'LPH7508-serdisplib'
#Display 'LPH7508'
#Display 'ctinclud'
diff --git a/udelay.c b/udelay.c
index 82011db..14ccee9 100644
--- a/udelay.c
+++ b/udelay.c
@@ -1,4 +1,4 @@
-/* $Id: udelay.c,v 1.21 2005/12/12 09:08:08 reinelt Exp $
+/* $Id: udelay.c,v 1.22 2006/08/10 19:06:52 reinelt Exp $
*
* short delays
*
@@ -23,6 +23,9 @@
*
*
* $Log: udelay.c,v $
+ * Revision 1.22 2006/08/10 19:06:52 reinelt
+ * new 'fuzz' parameter for timings
+ *
* Revision 1.21 2005/12/12 09:08:08 reinelt
* finally removed old udelay code path; read timing values from config
*
@@ -232,13 +235,22 @@ void udelay_init(void)
unsigned long timing(const char *driver, const char *section, const char *name, const int defval, const char *unit)
{
char sec[256];
- int ret, val;
+ int fuzz, val;
qprintf(sec, sizeof(sec), "%s.Timing", section);
- ret = cfg_number(sec, name, defval, 0, -1, &val);
+ /* fuzz all timings by given factor */
+ cfg_number(sec, "fuzz", 100, 1, -1, &fuzz);
+
+ cfg_number(sec, name, defval, 0, -1, &val);
+ val = val * fuzz / 100;
+
if (val != defval) {
- info("%s: timing: %6s = %5d %s (default %d %s)", driver, name, val, unit, defval, unit);
+ if (fuzz != 100) {
+ info("%s: timing: %6s = %5d %s (default %d %s, fuzz %d)", driver, name, val, unit, defval, unit, fuzz);
+ } else {
+ info("%s: timing: %6s = %5d %s (default %d %s)", driver, name, val, unit, defval, unit);
+ }
} else {
info("%s: timing: %6s = %5d %s (default)", driver, name, defval, unit);
}