From bbdb125fd6cdaf4acae3459b1b0e42e66bb9e96f Mon Sep 17 00:00:00 2001 From: reinelt Date: Sat, 17 Aug 2002 12:54:08 +0000 Subject: [lcd4linux @ 2002-08-17 12:54:08 by reinelt] minor T6963 changes git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@154 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- T6963.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/T6963.c b/T6963.c index 96ab4a3..690a628 100644 --- a/T6963.c +++ b/T6963.c @@ -1,4 +1,4 @@ -/* $Id: T6963.c,v 1.1 2002/04/29 11:00:26 reinelt Exp $ +/* $Id: T6963.c,v 1.2 2002/08/17 12:54:08 reinelt Exp $ * * driver for display modules based on the Toshiba T6963 chip * @@ -20,6 +20,9 @@ * * * $Log: T6963.c,v $ + * Revision 1.2 2002/08/17 12:54:08 reinelt + * minor T6963 changes + * * Revision 1.1 2002/04/29 11:00:26 reinelt * * added Toshiba T6963 driver @@ -132,6 +135,8 @@ void T6_status1 (void) ioctl (PPfd, PPDATADIR, &direction); } +// Fixme: +static int bug=0; // perform status check in "auto mode" void T6_status2 (void) @@ -156,10 +161,12 @@ void T6_status2 (void) rep_nop(); if (++n>1000) { debug("hang in status2"); + bug=1; break; } ioctl (PPfd, PPRDATA, &data); - } while ((data & 0x08) == 0); + // } while ((data & 0x08) == 0); + } while ((data & 0x08) != 0x08); // rise RD and CE ctrl = RD_H | WR_H | CE_H | CD_H; @@ -190,6 +197,8 @@ static void T6_write_cmd (unsigned char cmd) // rise WR and CE ctrl = RD_H | WR_H | CE_H | CD_H; ioctl (PPfd, PPWCONTROL, &ctrl); + + ndelay(40); // Data Hold Time } static void T6_write_data (unsigned char data) @@ -218,12 +227,11 @@ static void T6_write_data (unsigned char data) ctrl = RD_H | WR_H | CE_H | CD_L; ioctl (PPfd, PPWCONTROL, &ctrl); - ndelay(10); // C/D Hold Time + ndelay(40); // Data Hold Time // rise CD ctrl = RD_H | WR_H | CE_H | CD_H; ioctl (PPfd, PPWCONTROL, &ctrl); - } static void T6_write_auto (unsigned char data) @@ -252,12 +260,11 @@ static void T6_write_auto (unsigned char data) ctrl = RD_H | WR_H | CE_H | CD_L; ioctl (PPfd, PPWCONTROL, &ctrl); - ndelay(10); // C/D Hold Time + ndelay(40); // Data Hold Time // rise CD ctrl = RD_H | WR_H | CE_H | CD_H; ioctl (PPfd, PPWCONTROL, &ctrl); - } static void T6_send_byte (unsigned char cmd, unsigned char data) @@ -281,6 +288,10 @@ static void T6_memset(unsigned short addr, unsigned char data, int len) T6_write_cmd(0xb0); // Set Data Auto Write for (i=0; i