diff options
author | reinelt <> | 2004-01-22 07:57:45 +0000 |
---|---|---|
committer | reinelt <> | 2004-01-22 07:57:45 +0000 |
commit | ecaaaf0860a2df36c6d39ee4dd2b121e7e1a6c5a (patch) | |
tree | 13a5b0ebc7c53e2f7214969f601e62161020a899 /drv_Crystalfontz.c | |
parent | 7c735f931f35ab3f94075cd57af42ad73eb5f72e (diff) | |
download | lcd4linux-ecaaaf0860a2df36c6d39ee4dd2b121e7e1a6c5a.tar.gz |
[lcd4linux @ 2004-01-22 07:57:45 by reinelt]
several bugs fixed where segfaulting on layout>display
Crystalfontz driver optimized, 632 display already works
Diffstat (limited to 'drv_Crystalfontz.c')
-rw-r--r-- | drv_Crystalfontz.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drv_Crystalfontz.c b/drv_Crystalfontz.c index 5c3bf1b..bff3ccd 100644 --- a/drv_Crystalfontz.c +++ b/drv_Crystalfontz.c @@ -1,4 +1,4 @@ -/* $Id: drv_Crystalfontz.c,v 1.1 2004/01/21 12:36:19 reinelt Exp $ +/* $Id: drv_Crystalfontz.c,v 1.2 2004/01/22 07:57:45 reinelt Exp $ * * new style driver for Crystalfontz display modules * @@ -23,6 +23,10 @@ * * * $Log: drv_Crystalfontz.c,v $ + * Revision 1.2 2004/01/22 07:57:45 reinelt + * several bugs fixed where segfaulting on layout>display + * Crystalfontz driver optimized, 632 display already works + * * Revision 1.1 2004/01/21 12:36:19 reinelt * Crystalfontz NextGeneration driver added * @@ -107,7 +111,8 @@ static void drv_CF_define_char (int ascii, char *buffer) { char cmd[2]="\031n"; // set custom char bitmap - cmd[1]=(char)ascii; + // user-defineable chars start at 128, but are defined at 0 + cmd[1]=(char)(ascii-CHAR0); drv_generic_serial_write (cmd, 2); drv_generic_serial_write (buffer, 8); } @@ -234,9 +239,10 @@ int drv_CF_init (char *section) WIDGET_CLASS wc; int ret; - XRES=5; - YRES=8; - CHARS=8; + XRES=6; // pixel width of one char + YRES=8; // pixel height of one char + CHARS=8; // number of user-defineable chars + CHAR0=128; // ascii of first user-defineable chars // start display if ((ret=drv_CF_start (section))!=0) @@ -251,8 +257,7 @@ int drv_CF_init (char *section) return ret; // add fixed chars to the bar driver - 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 + drv_generic_text_bar_add_segment (0, 0, 255, 32); // ASCII 32 = blank // register text widget wc=Widget_Text; |