aboutsummaryrefslogtreecommitdiffstats
path: root/lcd4linux.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2000-04-15 11:13:54 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2000-04-15 11:13:54 +0000
commit24f64dfa553a9b713aeb3c1a1f1592ab7973f85e (patch)
treeae8a6348cdb49be80e7b2b39979259a74c923ce3 /lcd4linux.c
parent6dfd10e9f5aef7c0411aaf0c0de775a3c011e33a (diff)
downloadlcd4linux-24f64dfa553a9b713aeb3c1a1f1592ab7973f85e.tar.gz
[lcd4linux @ 2000-04-15 11:13:54 by reinelt]
added '-d' (debugging) switch added several debugging messages removed config entry 'Delay' for HD44780 driver delay loop for HD44780 will be calibrated automatically git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@45 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'lcd4linux.c')
-rw-r--r--lcd4linux.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/lcd4linux.c b/lcd4linux.c
index f41af96..25210fc 100644
--- a/lcd4linux.c
+++ b/lcd4linux.c
@@ -1,4 +1,4 @@
-/* $Id: lcd4linux.c,v 1.19 2000/04/10 04:40:53 reinelt Exp $
+/* $Id: lcd4linux.c,v 1.20 2000/04/15 11:13:54 reinelt Exp $
*
* LCD4Linux
*
@@ -20,6 +20,13 @@
*
*
* $Log: lcd4linux.c,v $
+ * Revision 1.20 2000/04/15 11:13:54 reinelt
+ *
+ * added '-d' (debugging) switch
+ * added several debugging messages
+ * removed config entry 'Delay' for HD44780 driver
+ * delay loop for HD44780 will be calibrated automatically
+ *
* Revision 1.19 2000/04/10 04:40:53 reinelt
*
* minor changes and cleanups
@@ -114,18 +121,22 @@
#include <stdio.h>
#include <unistd.h>
+#include "debug.h"
#include "cfg.h"
#include "display.h"
#include "processor.h"
char *release="LCD4Linux V" VERSION " (c) 2000 Michael Reinelt <reinelt@eunet.at>";
char *output=NULL;
+int debugging=0;
int tick, tack;
static void usage(void)
{
printf ("%s\n", release);
- printf ("usage: lcd4linux [-h] [-l] [-c key=value] [-f config-file] [-o output-file] [-q]\n");
+ printf ("usage: lcd4linux [-h]\n");
+ printf (" lcd4linux [-l]\n");
+ printf (" lcd4linux [-c key=value] [-d] [-f config-file] [-o output-file] [-q]\n");
}
int lcd_hello (void)
@@ -171,7 +182,7 @@ int main (int argc, char *argv[])
int c, smooth;
int quiet=0;
- while ((c=getopt (argc, argv, "c:f:hlo:q"))!=EOF) {
+ while ((c=getopt (argc, argv, "c:df:hlo:q"))!=EOF) {
switch (c) {
case 'c':
if (cfg_cmd (optarg)<0) {
@@ -179,6 +190,9 @@ int main (int argc, char *argv[])
exit(2);
}
break;
+ case 'd':
+ debugging++;
+ break;
case 'h':
usage();
exit(0);
@@ -205,6 +219,8 @@ int main (int argc, char *argv[])
exit(2);
}
+ debug ("LCD4Linux " VERSION "\n");
+
// set default values
cfg_set ("row1", "*** %o %v ***");
@@ -220,6 +236,8 @@ int main (int argc, char *argv[])
fprintf (stderr, "%s: missing 'display' entry!\n", cfg_file());
exit (1);
}
+
+ debug ("initializing driver %s\n", driver);
if (lcd_init(driver)==-1) {
exit (1);
}