From 5ec6cf452b9829303a75e59480749b1e2d9c7864 Mon Sep 17 00:00:00 2001 From: reinelt Date: Mon, 27 Feb 2006 08:12:34 +0000 Subject: [lcd4linux @ 2006-02-27 08:12:34 by reinelt] use serdisplib's full color support git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@651 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- drv_Noritake.c | 15 +++++++++++---- drv_generic_text.c | 19 ++++++++++++------- drv_serdisplib.c | 12 +++++++----- indent.sh | 2 +- 4 files changed, 31 insertions(+), 17 deletions(-) diff --git a/drv_Noritake.c b/drv_Noritake.c index 6763792..5413e11 100644 --- a/drv_Noritake.c +++ b/drv_Noritake.c @@ -1,4 +1,4 @@ -/* $Id: drv_Noritake.c,v 1.7 2006/02/27 06:15:55 reinelt Exp $ +/* $Id: drv_Noritake.c,v 1.8 2006/02/27 08:12:34 reinelt Exp $ * * Driver for a Noritake GU128x32-311 graphical display. * @@ -22,6 +22,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: drv_Noritake.c,v $ + * Revision 1.8 2006/02/27 08:12:34 reinelt + * use serdisplib's full color support + * * Revision 1.7 2006/02/27 06:15:55 reinelt * indent... * @@ -130,8 +133,12 @@ static unsigned char SIGNAL_CS; /* Chip select, OUTPUT, negative logic, pport AU static unsigned char SIGNAL_WR; /* Write OUTPUT, negative logic, pport STOBE */ static unsigned char SIGNAL_RESET; /* Reset, OUTPUT, negative logic, pport INIT */ static unsigned char SIGNAL_BLANK; /* Blank, OUTPUT , negative logic, pport SELECT-IN */ - /* static unsigned char SIGNAL_BUSY; *//* Busy, INPUT , positive logic, pport BUSY, not used */ - /* static unsigned char SIGNAL_FRP; *//* Frame Pulse, INPUT , positive logic, pport ACK, not used */ + +#if 0 +static unsigned char SIGNAL_BUSY; /* Busy, INPUT , positive logic, pport BUSY, not used */ +static unsigned char SIGNAL_FRP; /* Frame Pulse, INPUT , positive logic, pport ACK, not used */ +#endif + void (*drv_Noritake_clear) (void); /* Data port is positive logic */ @@ -351,7 +358,7 @@ int drv_Noritake_init(const char *section, const int quiet) WIDGET_CLASS wc; int ret; - info("%s: %s", Name, "$Revision: 1.7 $"); + info("%s: %s", Name, "$Revision: 1.8 $"); /* start display */ if ((ret = drv_Noritake_start(section)) != 0) diff --git a/drv_generic_text.c b/drv_generic_text.c index e50c322..146e601 100644 --- a/drv_generic_text.c +++ b/drv_generic_text.c @@ -1,4 +1,4 @@ -/* $Id: drv_generic_text.c,v 1.33 2006/02/27 06:15:55 reinelt Exp $ +/* $Id: drv_generic_text.c,v 1.34 2006/02/27 08:12:34 reinelt Exp $ * * generic driver helper for text-based displays * @@ -23,6 +23,9 @@ * * * $Log: drv_generic_text.c,v $ + * Revision 1.34 2006/02/27 08:12:34 reinelt + * use serdisplib's full color support + * * Revision 1.33 2006/02/27 06:15:55 reinelt * indent... * @@ -768,13 +771,15 @@ static void drv_generic_text_bar_create_segments(void) /* same style, same direction */ if (Segment[i].style == BarFB[n].style && Segment[i].dir & BarFB[n].dir) break; +#if 0 /* hollow style, val(1,2) == 1, like '[' */ -/* if (l1 == 1 && l2 == 1 && Segment[i].style == STYLE_FIRST && BarFB[n].style == STYLE_HOLLOW) - break; -*//* hollow style, val(1,2) == 1, like ']' */ -/* if (l1 == 1 && l2 == 1 && Segment[i].style == STYLE_LAST && BarFB[n].style == STYLE_HOLLOW) - break; -*/ } + if (l1 == 1 && l2 == 1 && Segment[i].style == STYLE_FIRST && BarFB[n].style == STYLE_HOLLOW) + break; + /* hollow style, val(1,2) == 1, like ']' */ + if (l1 == 1 && l2 == 1 && Segment[i].style == STYLE_LAST && BarFB[n].style == STYLE_HOLLOW) + break; +#endif + } } if (i == nSegment) { nSegment++; diff --git a/drv_serdisplib.c b/drv_serdisplib.c index c54cf72..30e7c50 100644 --- a/drv_serdisplib.c +++ b/drv_serdisplib.c @@ -1,4 +1,4 @@ -/* $Id: drv_serdisplib.c,v 1.9 2006/02/27 06:14:46 reinelt Exp $ +/* $Id: drv_serdisplib.c,v 1.10 2006/02/27 08:12:34 reinelt Exp $ * * driver for serdisplib displays * @@ -23,6 +23,9 @@ * * * $Log: drv_serdisplib.c,v $ + * Revision 1.10 2006/02/27 08:12:34 reinelt + * use serdisplib's full color support + * * Revision 1.9 2006/02/27 06:14:46 reinelt * graphic bug resulting in all black pixels solved * @@ -102,12 +105,11 @@ static serdisp_t *dd; static void drv_SD_blit(const int row, const int col, const int height, const int width) { int r, c; - long color; for (r = row; r < row + height; r++) { for (c = col; c < col + width; c++) { - color = drv_generic_graphic_black(r, c) ? SD_COL_BLACK : SD_COL_WHITE; - serdisp_setcolour(dd, c, r, color); + RGBA p = drv_generic_graphic_rgb(r, c); + serdisp_setcolour(dd, c, r, serdisp_pack2ARGB(0xff, p.R, p.G, p.B)); } } @@ -313,7 +315,7 @@ int drv_SD_init(const char *section, const int quiet) { int ret; - info("%s: %s", Name, "$Revision: 1.9 $"); + info("%s: %s", Name, "$Revision: 1.10 $"); /* real worker functions */ drv_generic_graphic_real_blit = drv_SD_blit; diff --git a/indent.sh b/indent.sh index 3cb0e1f..11a02b2 100755 --- a/indent.sh +++ b/indent.sh @@ -2,8 +2,8 @@ # -kr Use Kernighan & Ritchie coding style. # -l120 Set maximum line length for non-comment lines to 150. -# -pmt Preserve access and modification times on output files. +rm *.c~ *.h~ indent -kr -l120 *.c *.h for i in *.c *.h; do -- cgit v1.2.3