aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-06-09 06:40:29 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-06-09 06:40:29 +0000
commit8ac0cd282d05a3331104714aba66db9bd1715604 (patch)
tree300dc85a994c2d75342e45b5635e633641369d5c
parent382e529a22b88e5c2b438bdcee8b5a5717bc0389 (diff)
downloadlcd4linux-8ac0cd282d05a3331104714aba66db9bd1715604.tar.gz
[lcd4linux @ 2004-06-09 06:40:29 by reinelt]
splash screen for T6963 driver git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@471 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
-rw-r--r--drv_T6963.c34
-rw-r--r--drv_generic_graphic.c6
-rw-r--r--lcd4linux.conf.sample6
3 files changed, 35 insertions, 11 deletions
diff --git a/drv_T6963.c b/drv_T6963.c
index d3a62b3..b010d45 100644
--- a/drv_T6963.c
+++ b/drv_T6963.c
@@ -1,4 +1,4 @@
-/* $Id: drv_T6963.c,v 1.7 2004/06/06 06:51:59 reinelt Exp $
+/* $Id: drv_T6963.c,v 1.8 2004/06/09 06:40:29 reinelt Exp $
*
* new style driver for T6963-based displays
*
@@ -23,6 +23,10 @@
*
*
* $Log: drv_T6963.c,v $
+ * Revision 1.8 2004/06/09 06:40:29 reinelt
+ *
+ * splash screen for T6963 driver
+ *
* Revision 1.7 2004/06/06 06:51:59 reinelt
*
* do not display end splash screen if quiet=1
@@ -345,7 +349,7 @@ static void drv_T6_blit(int row, int col, int height, int width)
}
// max address
- m=((row+height)*DCOLS+col+width)/XRES;
+ m=((row+height-1)*DCOLS+col+width)/XRES;
for (i=(row*DCOLS+col)/XRES; i<=m; i++) {
if (Buffer1[i]==Buffer2[i]) continue;
@@ -419,13 +423,14 @@ static int drv_T6_start (char *section)
TROWS=DROWS/YRES; // text rows
TCOLS=DCOLS/XRES; // text cols
- Buffer1=malloc(DCOLS*TROWS);
+ Buffer1=malloc(TCOLS*DROWS);
if (Buffer1==NULL) {
error ("%s: framebuffer #1 could not be allocated: malloc() failed", Name);
return -1;
}
- Buffer2=malloc(DCOLS*TROWS);
+ debug ("malloc buffer 2 (%d*%d)=%d", TCOLS, DROWS, TCOLS*DROWS);
+ Buffer2=malloc(TCOLS*DROWS);
if (Buffer2==NULL) {
error ("%s: framebuffer #2 could not be allocated: malloc() failed", Name);
return -1;
@@ -433,7 +438,6 @@ static int drv_T6_start (char *section)
memset(Buffer1,0,TCOLS*DROWS*sizeof(*Buffer1));
memset(Buffer2,0,TCOLS*DROWS*sizeof(*Buffer2));
-
if (drv_generic_parport_open(section, Name) != 0) {
error ("%s: could not initialize parallel port!", Name);
@@ -536,6 +540,15 @@ int drv_T6_init (char *section, int quiet)
if ((ret=drv_generic_graphic_init(section, Name))!=0)
return ret;
+ if (!quiet) {
+ char buffer[40];
+ qprintf(buffer, sizeof(buffer), "%s %dx%d", Name, DCOLS, DROWS);
+ if (drv_generic_graphic_greet (buffer, NULL)) {
+ sleep (3);
+ drv_generic_graphic_clear();
+ }
+ }
+
// register text widget
wc=Widget_Text;
wc.draw=drv_generic_graphic_draw;
@@ -561,10 +574,17 @@ int drv_T6_init (char *section, int quiet)
// close driver & display
int drv_T6_quit (int quiet) {
-
+
info("%s: shutting down.", Name);
- drv_generic_parport_close();
+
+ drv_generic_graphic_clear();
+
+ if (!quiet) {
+ drv_generic_graphic_greet ("goodbye!", NULL);
+ }
+
drv_generic_graphic_quit();
+ drv_generic_parport_close();
if (Buffer1) {
free (Buffer1);
diff --git a/drv_generic_graphic.c b/drv_generic_graphic.c
index de9bf06..1ca96e0 100644
--- a/drv_generic_graphic.c
+++ b/drv_generic_graphic.c
@@ -23,6 +23,10 @@
*
*
* $Log: drv_generic_graphic.c,v $
+ * Revision 1.9 2004/06/09 06:40:29 reinelt
+ *
+ * splash screen for T6963 driver
+ *
* Revision 1.8 2004/06/08 21:46:38 reinelt
*
* splash screen for X11 driver (and generic graphic driver)
@@ -162,7 +166,7 @@ static void drv_generic_graphic_resizeFB (int rows, int cols)
int drv_generic_graphic_clear (void)
{
memset(drv_generic_graphic_FB, 0, DCOLS*DROWS*sizeof(*drv_generic_graphic_FB));
- drv_generic_graphic_real_blit (0, 0, DROWS * YRES, DCOLS * XRES);
+ drv_generic_graphic_real_blit (0, 0, DROWS, DCOLS);
return 0;
}
diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample
index 903072a..9e2235c 100644
--- a/lcd4linux.conf.sample
+++ b/lcd4linux.conf.sample
@@ -101,7 +101,7 @@ Display USBLCD {
Display T6963-240x64 {
Driver 'T6963'
Port '/dev/parports/0'
- Size '240x128'
+ Size '240x64'
Wire.CE 'STROBE'
Wire.CD 'SELECT'
Wire.RD 'AUTOFD'
@@ -600,8 +600,8 @@ Layout testMySQL {
#Display 'CF633'
#Display 'Curses'
#Display 'USBLCD'
-#Display 'T6963-240x64'
-Display 'XWindow'
+Display 'T6963-240x64'
+#Display 'XWindow'
#Display 'Image'
Layout 'Default'