aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2000-10-20 07:17:07 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2000-10-20 07:17:07 +0000
commit2415ddad4bd685c7d71403ba1332294ab0f2891a (patch)
tree74f45396093cd4d84bf758783b3ac272155de725
parentc862bfeed14239f56f09935c7f7270a4f81406e6 (diff)
downloadlcd4linux-2415ddad4bd685c7d71403ba1332294ab0f2891a.tar.gz
[lcd4linux @ 2000-10-20 07:17:07 by reinelt]
corrected a bug in HD_goto() Thanks to Gregor Szaktilla <gregor@szaktilla.de> git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@67 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
-rw-r--r--HD44780.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/HD44780.c b/HD44780.c
index 27000ee..27b3692 100644
--- a/HD44780.c
+++ b/HD44780.c
@@ -1,4 +1,4 @@
-/* $Id: HD44780.c,v 1.8 2000/08/10 09:44:09 reinelt Exp $
+/* $Id: HD44780.c,v 1.9 2000/10/20 07:17:07 reinelt Exp $
*
* driver for display modules based on the HD44780 chip
*
@@ -20,6 +20,12 @@
*
*
* $Log: HD44780.c,v $
+ * Revision 1.9 2000/10/20 07:17:07 reinelt
+ *
+ *
+ * corrected a bug in HD_goto()
+ * Thanks to Gregor Szaktilla <gregor@szaktilla.de>
+ *
* Revision 1.8 2000/08/10 09:44:09 reinelt
*
* new debugging scheme: error(), info(), debug()
@@ -401,8 +407,8 @@ int HD_init (LCD *Self)
void HD_goto (int row, int col)
{
int pos;
- pos=(row%2)*64+col;
- if (row>2) pos+=20;
+
+ pos=(row%2)*64+(row/2)*20+col;
HD_command (0x80|pos, 40);
}