aboutsummaryrefslogtreecommitdiffstats
path: root/drv_HD44780.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-05-31 05:38:02 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-05-31 05:38:02 +0000
commitea5453f570c5186379745a10054280f47a809299 (patch)
treecdf640e43c8a07c9d79278f5e47aefbd142130e2 /drv_HD44780.c
parent0bda5dcd7faa2198fe972aa85b8c72cb0b666554 (diff)
downloadlcd4linux-ea5453f570c5186379745a10054280f47a809299.tar.gz
[lcd4linux @ 2004-05-31 05:38:02 by reinelt]
fixed possible bugs with user-defined chars (clear high bits) thanks to Andy Baxter for debugging the MilfordInstruments driver! git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@449 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'drv_HD44780.c')
-rw-r--r--drv_HD44780.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drv_HD44780.c b/drv_HD44780.c
index 4450438..122a158 100644
--- a/drv_HD44780.c
+++ b/drv_HD44780.c
@@ -1,4 +1,4 @@
-/* $Id: drv_HD44780.c,v 1.22 2004/05/27 03:39:47 reinelt Exp $
+/* $Id: drv_HD44780.c,v 1.23 2004/05/31 05:38:02 reinelt Exp $
*
* new style driver for HD44780-based displays
*
@@ -29,6 +29,11 @@
*
*
* $Log: drv_HD44780.c,v $
+ * Revision 1.23 2004/05/31 05:38:02 reinelt
+ *
+ * fixed possible bugs with user-defined chars (clear high bits)
+ * thanks to Andy Baxter for debugging the MilfordInstruments driver!
+ *
* Revision 1.22 2004/05/27 03:39:47 reinelt
*
* changed function naming scheme to plugin::function
@@ -518,8 +523,15 @@ static void drv_HD_write (int row, int col, unsigned char *data, int len)
}
-static void drv_HD_defchar (int ascii, unsigned char *buffer)
+static void drv_HD_defchar (int ascii, unsigned char *matrix)
{
+ int i;
+ unsigned char buffer[8];
+
+ for (i = 0; i < 8; i++) {
+ buffer[i] = matrix[i] & 0x1f;
+ }
+
// define chars on *both* controllers!
drv_HD_command (allControllers, 0x40|8*ascii, T_EXEC);
drv_HD_data (allControllers, buffer, 8, T_WRCG);