]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2001-03-15 09:47:13 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 15 Mar 2001 09:47:13 +0000 (09:47 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Thu, 15 Mar 2001 09:47:13 +0000 (09:47 +0000)
some fixes to ppdef
off-by-one bug in processor.c fixed

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@122 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

HD44780.c
lcd4linux.conf.sample
processor.c

index 6589ee192241216a65d877a6455597d7b037bb65..0832d57cfd4305c1b70a3364575c0eb4407178e7 100644 (file)
--- a/HD44780.c
+++ b/HD44780.c
@@ -1,4 +1,4 @@
-/* $Id: HD44780.c,v 1.17 2001/03/14 16:47:41 reinelt Exp $
+/* $Id: HD44780.c,v 1.18 2001/03/15 09:47:13 reinelt Exp $
  *
  * driver for display modules based on the HD44780 chip
  *
  *
  *
  * $Log: HD44780.c,v $
+ * Revision 1.18  2001/03/15 09:47:13  reinelt
+ *
+ * some fixes to ppdef
+ * off-by-one bug in processor.c fixed
+ *
  * Revision 1.17  2001/03/14 16:47:41  reinelt
  * minor cleanups
  *
@@ -315,16 +320,17 @@ static int HD_open (void)
       error ("open(%s) failed: %s", PPdev, strerror(errno));
       return -1;
     }
-    
+
 #if 0
-    // FIXME: This doesn't work for some reason...
     if (ioctl(PPfd, PPEXCL)) {
-      error ("ioctl(%s, PPEXCL) failed: %s", PPdev, strerror(errno));
-      return -1;
+      debug ("ioctl(%s, PPEXCL) failed: %s", PPdev, strerror(errno));
+    } else {
+      debug ("ioctl(%s, PPEXCL) succeded.");
     }
 #endif
+
     if (ioctl(PPfd, PPCLAIM)) {
-      error ("ioctl(%s, PPCLAIM) failed: %s", PPdev, strerror(errno));
+      error ("ioctl(%s, PPCLAIM) failed: %d %s", PPdev, errno, strerror(errno));
       return -1;
     }
   } else
@@ -346,6 +352,7 @@ static int HD_open (void)
   HD_command (0x08, 40);   // Display off, cursor off, blink off
   HD_command (0x0c, 1640); // Display on, cursor off, blink off, wait 1.64 ms
   HD_command (0x06, 40);   // curser moves to right, no shift
+
   return 0;
 }
 
@@ -736,7 +743,7 @@ int HD_flush (void)
        if (Txt[row][col]=='\t') break;
        *p=Txt[row][col];
       }
-      HD_write (buffer, p-buffer, 40);
+      HD_write (buffer, p-buffer, 40); // 40 usec delay for write
     }
   }
 
@@ -749,6 +756,9 @@ int HD_quit (void)
 {
   if (PPdev) {
     debug ("closing ppdev %s", PPdev);
+    if (ioctl(PPfd, PPRELEASE)) {
+      error ("ioctl(%s, PPRELEASE) failed: %s", PPdev, strerror(errno));
+    }
     if (close(PPfd)==-1) {
       error ("close(%s) failed: %s", PPdev, strerror(errno));
       return -1;
index cf24bd7fbe42c74cf29960b04e2357c1478fc81c..5f14ec158ffd568179b38f636b922044d33f8b7d 100644 (file)
@@ -59,13 +59,13 @@ Size 24x2
 #Display SIN
 #Port /dev/tty9
 
-#Row1 "abcdefghijklmnopqrstuvwxyz"
-#Row2 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+Row1 "Busy %cb%% $r14cs+cb"
+Row2 "Load%l1%L$r14l1"
 
-Row1 "*** %o %v ***"
-Row2 "%p CPU  %r MB RAM"
-Row3 "Busy %cb%% $r10cs+cb"
-Row4 "Load%l1%L$r10l1"
+#Row1 "*** %o %v ***"
+#Row2 "%p CPU  %r MB RAM"
+#Row3 "Busy %cb%% $r10cs+cb"
+#Row4 "Load%l1%L$r10l1"
 
 # e(x)ecute command in %x*
 # Row5 %x1
index 45eaff73b5760bbd07eea850e3d99d5601e198ca..fdda6611df7a40913f293f3b5c9bd5bb8e63bd04 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: processor.c,v 1.20 2001/03/14 13:19:29 ltoetsch Exp $
+/* $Id: processor.c,v 1.21 2001/03/15 09:47:13 reinelt Exp $
  *
  * main data processing
  *
  *
  *
  * $Log: processor.c,v $
+ * Revision 1.21  2001/03/15 09:47:13  reinelt
+ *
+ * some fixes to ppdef
+ * off-by-one bug in processor.c fixed
+ *
  * Revision 1.20  2001/03/14 13:19:29  ltoetsch
  * Added pop3/imap4 mail support
  *
 #define ROWS 16
 #define GPOS 16
 
-char *row[ROWS];
-char  gpo[GPOS];
+char *row[ROWS+1];
+char  gpo[GPOS+1];
 int   rows, cols, xres, yres, supported_bars, gpos;
 int   token_usage[256]={0,};