diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-09-24 21:41:00 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-09-24 21:41:00 +0000 |
commit | 3588180b37d5a1c1c5e5fdefe93162bd76d5a20d (patch) | |
tree | af51ab5de2bcb32c3b1c9a4418357c4257e8adb4 /drv_USBLCD.c | |
parent | 35e7434afbf825b540210ae1c72c49a18baecc5a (diff) | |
download | lcd4linux-3588180b37d5a1c1c5e5fdefe93162bd76d5a20d.tar.gz |
[lcd4linux @ 2004-09-24 21:40:52 by reinelt]
new driver for the BWCT USB LCD interface board.
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@492 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'drv_USBLCD.c')
-rw-r--r-- | drv_USBLCD.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drv_USBLCD.c b/drv_USBLCD.c index 88f5d47..20209cd 100644 --- a/drv_USBLCD.c +++ b/drv_USBLCD.c @@ -1,4 +1,4 @@ -/* $Id: drv_USBLCD.c,v 1.15 2004/06/26 12:04:59 reinelt Exp $ +/* $Id: drv_USBLCD.c,v 1.16 2004/09/24 21:41:00 reinelt Exp $ * * new style driver for USBLCD displays * @@ -26,6 +26,9 @@ * * * $Log: drv_USBLCD.c,v $ + * Revision 1.16 2004/09/24 21:41:00 reinelt + * new driver for the BWCT USB LCD interface board. + * * Revision 1.15 2004/06/26 12:04:59 reinelt * * uh-oh... the last CVS log message messed up things a lot... @@ -187,7 +190,15 @@ static void drv_UL_clear (void) static void drv_UL_write (const int row, const int col, const char *data, int len) { - int pos = (row%2)*64 + (row/2)*20 + col; + int pos; + + /* 16x4 Displays use a slightly different layout */ + if (DCOLS==16 && DROWS==4) { + pos = (row%2)*64+(row/2)*16+col; + } else { + pos = (row%2)*64+(row/2)*20+col; + } + drv_UL_command (0x80|pos); while (len--) { |