From 663370ce872a8003c9175771b2444b933424e52c Mon Sep 17 00:00:00 2001 From: reinelt <> Date: Wed, 21 Aug 2002 06:09:53 +0000 Subject: [lcd4linux @ 2002-08-21 06:09:53 by reinelt] some T6963 fixes, ndelay wrap --- T6963.c | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) (limited to 'T6963.c') diff --git a/T6963.c b/T6963.c index b76d510..a659733 100644 --- a/T6963.c +++ b/T6963.c @@ -1,4 +1,4 @@ -/* $Id: T6963.c,v 1.3 2002/08/19 04:41:20 reinelt Exp $ +/* $Id: T6963.c,v 1.4 2002/08/21 06:09:53 reinelt Exp $ * * driver for display modules based on the Toshiba T6963 chip * @@ -20,6 +20,9 @@ * * * $Log: T6963.c,v $ + * Revision 1.4 2002/08/21 06:09:53 reinelt + * some T6963 fixes, ndelay wrap + * * Revision 1.3 2002/08/19 04:41:20 reinelt * introduced bar.c, moved bar stuff from display.h to bar.h * @@ -93,7 +96,6 @@ #define XRES 6 #define YRES 8 -#define BARS ( BAR_L | BAR_R | BAR_U | BAR_D | BAR_H2 | BAR_V2 | BAR_T) static LCD Lcd; @@ -169,7 +171,6 @@ void T6_status2 (void) break; } ioctl (PPfd, PPRDATA, &data); - // } while ((data & 0x08) == 0); } while ((data & 0x08) != 0x08); // rise RD and CE @@ -408,10 +409,10 @@ int T6_init (LCD *Self) debug ("setting %d columns", Lcd.cols); T6_send_word (0x40, 0x0000); // Set Text Home Address - T6_send_word (0x41, 40); // Set Text Area + T6_send_word (0x41, Lcd.cols); // Set Text Area T6_send_word (0x42, 0x0200); // Set Graphic Home Address - T6_send_word (0x43, 40); // Set Graphic Area + T6_send_word (0x43, Lcd.cols); // Set Graphic Area T6_write_cmd (0x80); // Mode Set: OR mode, Internal CG RAM mode T6_send_word (0x22, 0x0002); // Set Offset Register @@ -437,7 +438,8 @@ int T6_bar (int type, int row, int col, int max, int len1, int len2) int T6_flush (void) { int i, j, e; - + int count=0; + memset(Buffer1,0,Lcd.cols*Lcd.rows*Lcd.yres*sizeof(*Buffer1)); for (i=0; i