diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-05-23 08:58:30 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-05-23 08:58:30 +0000 |
commit | 6371e2f1c2caba411f4595e14f9b49d9efc7e638 (patch) | |
tree | 52350fe8f57ea4e052efb53463864f217d3ea928 | |
parent | 34e69ead4b80f67ddbf4114df25fd9906877cba5 (diff) | |
download | lcd4linux-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 '')
-rw-r--r-- | drv_USBLCD.c | 15 | ||||
-rw-r--r-- | lcd4linux.conf.sample | 7 |
2 files changed, 15 insertions, 7 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++; } diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample index 9f57059..eb1c4a0 100644 --- a/lcd4linux.conf.sample +++ b/lcd4linux.conf.sample @@ -42,7 +42,8 @@ Display HD44780-20x4 { # Port '0x378' Bits '8' Size '20x4' - asc255bug 1 + asc255bug 0 + Icons 1 Wire { RW 'GND' RS 'AUTOFD' @@ -69,6 +70,7 @@ Display USBLCD { Port '/dev/usb/lcd' Size '20x4' asc255bug 1 + Icons 1 } @@ -382,7 +384,8 @@ Widget Test { Layout Default { Row1 { - Col1 'OS' + Col1 'Heartbeat' + #Col1 'OS' } Row2 { Col1 'CPU' |