aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2001-03-15 09:47:13 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2001-03-15 09:47:13 +0000
commit1bbd55d6180fc18c16b401eafae2fa7ab84d01fa (patch)
tree4b07c5d5f82f2a65663f4d1d6233f7dadc177279
parent4b219e09f035d52e3f02b4a4fd042185a06fb670 (diff)
downloadlcd4linux-1bbd55d6180fc18c16b401eafae2fa7ab84d01fa.tar.gz
[lcd4linux @ 2001-03-15 09:47:13 by reinelt]
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
Diffstat (limited to '')
-rw-r--r--HD44780.c24
-rw-r--r--lcd4linux.conf.sample12
-rw-r--r--processor.c11
3 files changed, 31 insertions, 16 deletions
diff --git a/HD44780.c b/HD44780.c
index 6589ee1..0832d57 100644
--- 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
*
@@ -20,6 +20,11 @@
*
*
* $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;
diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample
index cf24bd7..5f14ec1 100644
--- a/lcd4linux.conf.sample
+++ b/lcd4linux.conf.sample
@@ -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
diff --git a/processor.c b/processor.c
index 45eaff7..fdda661 100644
--- a/processor.c
+++ b/processor.c
@@ -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
*
@@ -20,6 +20,11 @@
*
*
* $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
*
@@ -141,8 +146,8 @@
#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,};
2-06-09 11:59:22 +0100'>2012-06-09Mark as linux-any to save CPU cycles on KFreeBSD/Hurd builddsJonathan McCrohan2-1/+7 2012-05-06Release 0.7.5-1debian/0.7.5-1Jonathan McCrohan1-0/+7 2012-05-06Imported Upstream version 0.7.5upstream/0.7.5Jonathan McCrohan12-44/+218 2012-03-06Release 0.7.4-1debian/0.7.4-1Jonathan McCrohan4-157/+10 2012-03-05Imported Upstream version 0.7.4upstream/0.7.4Jonathan McCrohan13-134/+244 2012-02-26Update 02-fix-wavemonrc.5-man-errors.patchdebian/0.7.3-1Jonathan McCrohan1-14/+23 Add fix for hyphen-used-as-minus-sign linitan warning. 2012-02-26Switch to dh-style rules.Jonathan McCrohan3-10/+4 2012-02-21Refresh patchesJonathan McCrohan3-1/+149 2012-02-21Refresh changelogJonathan McCrohan1-4/+5 2012-02-21Add details to patch.Jonathan McCrohan1-0/+5 2012-02-06Promote myself to maintainer.Jonathan McCrohan3-9/+8 2012-02-05Change to dpkg-source 3.0Jonathan McCrohan1-2/+2 2012-02-05Update broken handcrafted patchJonathan McCrohan1-2/+2 2012-02-05Use 3.0 (quilt)Jonathan McCrohan2-2/+2 2012-02-05Use 3.0 (quilt)Jonathan McCrohan3-0/+13 2012-02-05Use quiltJonathan McCrohan3-6/+9 2012-02-05Update changelogJonathan McCrohan1-1/+6 2012-02-05clean up packagingJonathan McCrohan2-2/+1 2012-02-05fix errorsJonathan McCrohan3-10/+3 2012-02-05Undo accidental source changesJonathan McCrohan2-9/+9 2012-02-05Add patch to remove copyingJonathan McCrohan2-1/+9