From 5aef0c5097df02b2809eb86c0c81c9e04667ee8e Mon Sep 17 00:00:00 2001 From: reinelt <> Date: Fri, 24 Sep 2004 21:41:00 +0000 Subject: [lcd4linux @ 2004-09-24 21:40:52 by reinelt] new driver for the BWCT USB LCD interface board. --- drv_USBLCD.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'drv_USBLCD.c') 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--) { -- cgit v1.2.3