diff options
author | reinelt <> | 2003-07-24 04:48:09 +0000 |
---|---|---|
committer | reinelt <> | 2003-07-24 04:48:09 +0000 |
commit | 80ad6d155c1b974590f0c96b6291b0baa70b09d5 (patch) | |
tree | b53a7102debdc89d8fe44e0c6b913019d78f60bc /Cwlinux.c | |
parent | a7a6b96ef3ef6a0abc6790addb8dc298ae7bb693 (diff) | |
download | lcd4linux-80ad6d155c1b974590f0c96b6291b0baa70b09d5.tar.gz |
[lcd4linux @ 2003-07-24 04:48:09 by reinelt]
'soft clear' needed for virtual rows
Diffstat (limited to 'Cwlinux.c')
-rw-r--r-- | Cwlinux.c | 27 |
1 files changed, 16 insertions, 11 deletions
@@ -1,4 +1,4 @@ -/* $Id: Cwlinux.c,v 1.8 2003/05/19 05:55:17 reinelt Exp $ +/* $Id: Cwlinux.c,v 1.9 2003/07/24 04:48:09 reinelt Exp $ * * driver for Cwlinux serial display modules * @@ -20,6 +20,9 @@ * * * $Log: Cwlinux.c,v $ + * Revision 1.9 2003/07/24 04:48:09 reinelt + * 'soft clear' needed for virtual rows + * * Revision 1.8 2003/05/19 05:55:17 reinelt * Cwlinux sleep optimization * @@ -199,7 +202,7 @@ static void CW1602_define_char (int ascii, char *buffer) } -int CW_clear(void) +int CW_clear(int full) { int row, col; @@ -211,17 +214,19 @@ int CW_clear(void) bar_clear(); + if (full) { #if 0 - CW_write("\376X\375",3); + CW_write("\376X\375",3); #else - // for some mysterious reason, we have to sleep after - // the command _and_ after the CMD_END... - usleep(20); - CW_write("\376X",2); - usleep(20); - CW_write("\375",1); - usleep(20); + // for some mysterious reason, we have to sleep after + // the command _and_ after the CMD_END... + usleep(20); + CW_write("\376X",2); + usleep(20); + CW_write("\375",1); + usleep(20); #endif + } return 0; } @@ -308,7 +313,7 @@ int CW_init(LCD * Self) info ("Cwlinux Firmware %d.%d", (int)buffer[0], (int)buffer[1]); #endif - CW_clear(); + CW_clear(1); // auto line wrap off CW_write ("\376D\375", 3); |