diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-05-31 05:38:02 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-05-31 05:38:02 +0000 |
commit | ea5453f570c5186379745a10054280f47a809299 (patch) | |
tree | cdf640e43c8a07c9d79278f5e47aefbd142130e2 /drv_USBLCD.c | |
parent | 0bda5dcd7faa2198fe972aa85b8c72cb0b666554 (diff) | |
download | lcd4linux-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_USBLCD.c')
-rw-r--r-- | drv_USBLCD.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drv_USBLCD.c b/drv_USBLCD.c index 1fbad54..17c2cd2 100644 --- a/drv_USBLCD.c +++ b/drv_USBLCD.c @@ -1,4 +1,4 @@ -/* $Id: drv_USBLCD.c,v 1.4 2004/05/26 11:37:36 reinelt Exp $ +/* $Id: drv_USBLCD.c,v 1.5 2004/05/31 05:38:02 reinelt Exp $ * * new style driver for USBLCD displays * @@ -26,6 +26,11 @@ * * * $Log: drv_USBLCD.c,v $ + * Revision 1.5 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.4 2004/05/26 11:37:36 reinelt * * Curses driver ported. @@ -135,15 +140,15 @@ static void drv_UL_write (int row, int col, unsigned char *data, int len) drv_UL_send(); } -static void drv_UL_defchar (int ascii, unsigned char *buffer) +static void drv_UL_defchar (int ascii, unsigned char *matrix) { int i; drv_UL_command (0x40|8*ascii); for (i = 0; i < 8; i++) { - if(*buffer == 0) *BufPtr++ = 0; - *BufPtr++ = *buffer++; + if(*matrix == 0) *BufPtr++ = 0; + *BufPtr++ = *matrix++ & 0x1f; } drv_UL_send(); |