aboutsummaryrefslogtreecommitdiffstats
path: root/lcd4linux.c
diff options
context:
space:
mode:
authorreinelt <>2000-04-17 05:14:27 +0000
committerreinelt <>2000-04-17 05:14:27 +0000
commitc2006e7cd933e3df3e3af37c45298b2dc336b33f (patch)
treea7b1b907a2729b243fe30f370d90b0b1ee778720 /lcd4linux.c
parent9662e513c220b9826702978ba42fc46b0a326c38 (diff)
downloadlcd4linux-c2006e7cd933e3df3e3af37c45298b2dc336b33f.tar.gz
[lcd4linux @ 2000-04-17 05:14:27 by reinelt]
added README.44780
Diffstat (limited to 'lcd4linux.c')
-rw-r--r--lcd4linux.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/lcd4linux.c b/lcd4linux.c
index 75b195a..0e82382 100644
--- a/lcd4linux.c
+++ b/lcd4linux.c
@@ -1,4 +1,4 @@
-/* $Id: lcd4linux.c,v 1.22 2000/04/15 16:56:52 reinelt Exp $
+/* $Id: lcd4linux.c,v 1.23 2000/04/17 05:14:27 reinelt Exp $
*
* LCD4Linux
*
@@ -20,6 +20,10 @@
*
*
* $Log: lcd4linux.c,v $
+ * Revision 1.23 2000/04/17 05:14:27 reinelt
+ *
+ * added README.44780
+ *
* Revision 1.22 2000/04/15 16:56:52 reinelt
*
* moved delay loops to udelay.c
@@ -189,6 +193,22 @@ int lcd_hello (void)
return flag;
}
+void calibrate (void)
+{
+ int i;
+ unsigned long max=0;
+
+ printf ("%s\n", release);
+ printf ("calibrating delay loop:");
+ fflush(stdout);
+ for (i=0; i<10; i++) {
+ udelay_calibrate();
+ if (loops_per_usec>max)
+ max=loops_per_usec;
+ }
+ printf (" Delay=%ld\n", max);
+}
+
int main (int argc, char *argv[])
{
char *cfg="/etc/lcd4linux.conf";
@@ -205,9 +225,7 @@ int main (int argc, char *argv[])
}
break;
case 'd':
- printf ("%s\n", release);
- udelay_calibrate();
- printf ("calibrating delay loop: Delay=%ld\n", loops_per_usec);
+ calibrate();
exit(0);
case 'h':
usage();