aboutsummaryrefslogtreecommitdiffstats
path: root/M50530.c
diff options
context:
space:
mode:
authorreinelt <>2003-07-24 04:48:09 +0000
committerreinelt <>2003-07-24 04:48:09 +0000
commit80ad6d155c1b974590f0c96b6291b0baa70b09d5 (patch)
treeb53a7102debdc89d8fe44e0c6b913019d78f60bc /M50530.c
parenta7a6b96ef3ef6a0abc6790addb8dc298ae7bb693 (diff)
downloadlcd4linux-80ad6d155c1b974590f0c96b6291b0baa70b09d5.tar.gz
[lcd4linux @ 2003-07-24 04:48:09 by reinelt]
'soft clear' needed for virtual rows
Diffstat (limited to 'M50530.c')
-rw-r--r--M50530.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/M50530.c b/M50530.c
index 37ffe7c..e079463 100644
--- a/M50530.c
+++ b/M50530.c
@@ -1,4 +1,4 @@
-/* $Id: M50530.c,v 1.8 2003/04/07 06:02:59 reinelt Exp $
+/* $Id: M50530.c,v 1.9 2003/07/24 04:48:09 reinelt Exp $
*
* driver for display modules based on the M50530 chip
*
@@ -20,6 +20,9 @@
*
*
* $Log: M50530.c,v $
+ * Revision 1.9 2003/07/24 04:48:09 reinelt
+ * 'soft clear' needed for virtual rows
+ *
* Revision 1.8 2003/04/07 06:02:59 reinelt
* further parallel port abstraction
*
@@ -145,7 +148,7 @@ static void M5_define_char (int ascii, char *buffer)
}
-int M5_clear (void)
+int M5_clear (int full)
{
int row, col;
@@ -158,9 +161,12 @@ int M5_clear (void)
bar_clear();
GPO=0;
- M5_setGPO (GPO); // All GPO's off
- M5_command (0x0001, 1250); // clear display
+ if (full) {
+ M5_command (0x0001, 1250); // clear display
+ M5_setGPO (GPO); // All GPO's off
+ }
+
return 0;
}
@@ -214,12 +220,11 @@ int M5_init (LCD *Self)
M5_command (0x0020, 20); // set display mode
M5_command (0x0050, 20); // set entry mode
M5_command (0x0030, 20); // set display mode
- M5_command (0x0001, 1250); // clear display
bar_init(rows, cols, XRES, YRES, CHARS);
bar_add_segment(0,0,255,32); // ASCII 32 = blank
- M5_clear();
+ M5_clear(1);
return 0;
}