aboutsummaryrefslogtreecommitdiffstats
path: root/drv_MatrixOrbital.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_MatrixOrbital.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_MatrixOrbital.c')
-rw-r--r--drv_MatrixOrbital.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drv_MatrixOrbital.c b/drv_MatrixOrbital.c
index 573b683..5a65c54 100644
--- a/drv_MatrixOrbital.c
+++ b/drv_MatrixOrbital.c
@@ -1,4 +1,4 @@
-/* $Id: drv_MatrixOrbital.c,v 1.24 2004/05/28 13:51:42 reinelt Exp $
+/* $Id: drv_MatrixOrbital.c,v 1.25 2004/05/31 05:38:02 reinelt Exp $
*
* new style driver for Matrix Orbital serial display modules
*
@@ -23,6 +23,11 @@
*
*
* $Log: drv_MatrixOrbital.c,v $
+ * Revision 1.25 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.24 2004/05/28 13:51:42 reinelt
*
* ported driver for Beckmann+Egle Mini-Terminals
@@ -217,13 +222,16 @@ static void drv_MO_write (int row, int col, unsigned char *data, int len)
}
-static void drv_MO_defchar (int ascii, unsigned char *buffer)
+static void drv_MO_defchar (int ascii, unsigned char *matrix)
{
- char cmd[3]="\376N";
+ int i;
+ char cmd[11]="\376N";
cmd[2]=(char)ascii;
- drv_generic_serial_write (cmd, 3);
- drv_generic_serial_write (buffer, 8);
+ for (i = 0; i < 8; i++) {
+ cmd[i+3] = matrix[i] & 0x1f;
+ }
+ drv_generic_serial_write (cmd, 11);
}