]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2003-08-22 03:45:08 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Fri, 22 Aug 2003 03:45:09 +0000 (03:45 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Fri, 22 Aug 2003 03:45:09 +0000 (03:45 +0000)
bug in parallel port code fixed, more icons stuff

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

HD44780.c
MatrixOrbital.c
parport.c

index 5417877497d97ae1a5b087b17ae2478f8ca64d81..d4b27e42ec6cf618a07e47669247c4c39cd64c91 100644 (file)
--- a/HD44780.c
+++ b/HD44780.c
@@ -1,4 +1,4 @@
-/* $Id: HD44780.c,v 1.34 2003/08/19 05:23:55 reinelt Exp $
+/* $Id: HD44780.c,v 1.35 2003/08/22 03:45:08 reinelt Exp $
  *
  * driver for display modules based on the HD44780 chip
  *
@@ -27,6 +27,9 @@
  *
  *
  * $Log: HD44780.c,v $
+ * Revision 1.35  2003/08/22 03:45:08  reinelt
+ * bug in parallel port code fixed, more icons stuff
+ *
  * Revision 1.34  2003/08/19 05:23:55  reinelt
  * HD44780 dual-controller patch from Jesse Brook Kovach
  *
@@ -469,9 +472,9 @@ int HD_init (LCD *Self)
     return -1;
   }
 
-  // clear RW
+  // clear all signals
   if (Bits==8) {
-    parport_control (SIGNAL_RW, 0);
+    parport_control (SIGNAL_RS|SIGNAL_RW|SIGNAL_ENABLE|SIGNAL_ENABLE2|SIGNAL_GPO, 0);
   } else {
     parport_data (0);
   }
index 68198b349a644d327aa4e191400d477586b8f491..36e69613f8b4efec4f504c4f9f3d474b73b3cd9e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: MatrixOrbital.c,v 1.31 2003/08/19 04:28:41 reinelt Exp $
+/* $Id: MatrixOrbital.c,v 1.32 2003/08/22 03:45:08 reinelt Exp $
  *
  * driver for Matrix Orbital serial display modules
  *
@@ -20,6 +20,9 @@
  *
  *
  * $Log: MatrixOrbital.c,v $
+ * Revision 1.32  2003/08/22 03:45:08  reinelt
+ * bug in parallel port code fixed, more icons stuff
+ *
  * Revision 1.31  2003/08/19 04:28:41  reinelt
  * more Icon stuff, minor glitches fixed
  *
@@ -417,7 +420,15 @@ int MO_bar (int type, int row, int col, int max, int len1, int len2)
 
 int MO_icon (int num, int row, int col, unsigned char *bitmap)
 {
-  // Fixme: ToDo!!
+  // icons use last ascii codes
+  char ascii=CHARS-num;
+
+  MO_define_char (ascii, bitmap);
+  MO_goto(row, col);
+  MO_write(&ascii, 1);
+  FrameBuffer1[row*Lcd.cols+col]=(char)ascii;
+  FrameBuffer2[row*Lcd.cols+col]=(char)ascii;
+
   return 0;
 }
 
@@ -441,7 +452,7 @@ static int MO_flush (int protocol)
   int row, col, pos1, pos2;
   int c, equal;
   int gpo;
-  
+
   bar_process(MO_define_char);
   
   for (row=0; row<Lcd.rows; row++) {
index db633b7fe0ad89aaac7b54dc8a2d282bf7880846..b638ceaf469c7ed8fb49525100dd45c40b6fc9c1 100644 (file)
--- a/parport.c
+++ b/parport.c
@@ -1,4 +1,4 @@
-/* $Id: parport.c,v 1.5 2003/08/19 05:23:55 reinelt Exp $
+/* $Id: parport.c,v 1.6 2003/08/22 03:45:09 reinelt Exp $
  *
  * generic parallel port handling
  *
@@ -20,6 +20,9 @@
  *
  *
  * $Log: parport.c,v $
+ * Revision 1.6  2003/08/22 03:45:09  reinelt
+ * bug in parallel port code fixed, more icons stuff
+ *
  * Revision 1.5  2003/08/19 05:23:55  reinelt
  * HD44780 dual-controller patch from Jesse Brook Kovach
  *
@@ -374,7 +377,7 @@ void parport_toggle (unsigned char bits, int level, int delay)
   
   // Strobe, Select and AutoFeed are inverted!
   value1 = bits & (value1 ^ (PARPORT_CONTROL_STROBE|PARPORT_CONTROL_SELECT|PARPORT_CONTROL_AUTOFD));
-  value2 = bits & (value1 ^ (PARPORT_CONTROL_STROBE|PARPORT_CONTROL_SELECT|PARPORT_CONTROL_AUTOFD));
+  value2 = bits & (value2 ^ (PARPORT_CONTROL_STROBE|PARPORT_CONTROL_SELECT|PARPORT_CONTROL_AUTOFD));
   
  
 #ifdef WITH_PPDEV