aboutsummaryrefslogtreecommitdiffstats
path: root/drv_HD44780.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-21 06:39:27 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-21 06:39:27 +0000
commit83df846028ed3a272242276c1d94f86a6c7af2a7 (patch)
tree6d61a249bb759d8766efee2ef601ca1fcc9a21a0 /drv_HD44780.c
parentd29b8c45e95d99709234fb6632574d38fa472321 (diff)
downloadlcd4linux-83df846028ed3a272242276c1d94f86a6c7af2a7.tar.gz
[lcd4linux @ 2004-01-21 06:39:27 by reinelt]
HD44780 missed the "clear display' sequence asc255bug handling added HD44780 tested, works here! git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@328 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'drv_HD44780.c')
-rw-r--r--drv_HD44780.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drv_HD44780.c b/drv_HD44780.c
index d841a7b..8432057 100644
--- a/drv_HD44780.c
+++ b/drv_HD44780.c
@@ -1,4 +1,4 @@
-/* $Id: drv_HD44780.c,v 1.1 2004/01/20 15:32:49 reinelt Exp $
+/* $Id: drv_HD44780.c,v 1.2 2004/01/21 06:39:27 reinelt Exp $
*
* new style driver for HD44780-based displays
*
@@ -29,6 +29,11 @@
*
*
* $Log: drv_HD44780.c,v $
+ * Revision 1.2 2004/01/21 06:39:27 reinelt
+ * HD44780 missed the "clear display' sequence
+ * asc255bug handling added
+ * HD44780 tested, works here!
+ *
* Revision 1.1 2004/01/20 15:32:49 reinelt
* first version of Next Generation HD44780 (untested! but it compiles...)
* some cleanup in the other drivers
@@ -347,7 +352,9 @@ static int drv_HD_start (char *section)
drv_HD_command (0x03, 0x08, T_EXEC); // Display off, cursor off, blink off
drv_HD_command (0x03, 0x0c, T_CLEAR); // Display on, cursor off, blink off, wait 1.64 ms
drv_HD_command (0x03, 0x06, T_EXEC); // curser moves to right, no shift
-
+ drv_HD_command (0x03, 0x01, T_CLEAR); // clear *both* displays
+ drv_HD_command (0x03, 0x03, T_CLEAR); // return home
+
return 0;
}
@@ -424,6 +431,7 @@ int drv_HD_list (void)
int drv_HD_init (char *section)
{
WIDGET_CLASS wc;
+ int asc255bug;
int ret;
XRES=5;
@@ -443,8 +451,13 @@ int drv_HD_init (char *section)
return ret;
// add fixed chars to the bar driver
+ // most displays have a full block on ascii 255, but some have kind of
+ // an 'inverted P'. If you specify 'asc255bug 1 in the config, this
+ // char will not be used, but rendered by the bar driver
+ cfg_number(section, "asc255bug", 0, 0, 1, &asc255bug);
drv_generic_text_bar_add_segment ( 0, 0,255, 32); // ASCII 32 = blank
- drv_generic_text_bar_add_segment (255,255,255,255); // ASCII 255 = block
+ if (!asc255bug)
+ drv_generic_text_bar_add_segment (255,255,255,255); // ASCII 255 = block
// register text widget
wc=Widget_Text;