aboutsummaryrefslogtreecommitdiffstats
path: root/drv_USBLCD.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-05-23 08:58:30 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-05-23 08:58:30 +0000
commit6371e2f1c2caba411f4595e14f9b49d9efc7e638 (patch)
tree52350fe8f57ea4e052efb53463864f217d3ea928 /drv_USBLCD.c
parent34e69ead4b80f67ddbf4114df25fd9906877cba5 (diff)
downloadlcd4linux-6371e2f1c2caba411f4595e14f9b49d9efc7e638.tar.gz
[lcd4linux @ 2004-05-23 08:58:30 by reinelt]
icon bug with USBLCD fixed git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@428 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'drv_USBLCD.c')
-rw-r--r--drv_USBLCD.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drv_USBLCD.c b/drv_USBLCD.c
index 69273af..55b25b6 100644
--- a/drv_USBLCD.c
+++ b/drv_USBLCD.c
@@ -1,4 +1,4 @@
-/* $Id: drv_USBLCD.c,v 1.2 2004/03/19 09:17:46 reinelt Exp $
+/* $Id: drv_USBLCD.c,v 1.3 2004/05/23 08:58:30 reinelt Exp $
*
* new style driver for USBLCD displays
*
@@ -26,6 +26,10 @@
*
*
* $Log: drv_USBLCD.c,v $
+ * Revision 1.3 2004/05/23 08:58:30 reinelt
+ *
+ * icon bug with USBLCD fixed
+ *
* Revision 1.2 2004/03/19 09:17:46 reinelt
*
* removed the extra 'goto' function, row and col are additional parameters
@@ -116,12 +120,12 @@ static void drv_UL_command (unsigned char cmd)
static void drv_UL_write (int row, int col, unsigned char *data, int len)
{
- int pos=(row%2)*64+(row/2)*20+col;
+ int pos = (row%2)*64 + (row/2)*20 + col;
drv_UL_command (0x80|pos);
while (len--) {
- if(*data==0) *BufPtr++=*data;
- *BufPtr++=*data++;
+ if(*data == 0) *BufPtr++ = 0;
+ *BufPtr++ = *data++;
}
drv_UL_send();
@@ -133,7 +137,8 @@ static void drv_UL_defchar (int ascii, unsigned char *buffer)
drv_UL_command (0x40|8*ascii);
- for (i=0; i<8; i++) {
+ for (i = 0; i < 8; i++) {
+ if(*buffer == 0) *BufPtr++ = 0;
*BufPtr++ = *buffer++;
}