FreeCalypso > hg > tcs211-c139
changeset 44:a39516059f83
gdi display.c: using D-Sample-like approach fixed the display garbage bug
author | Mychaela Falconia <falcon@ivan.Harhan.ORG> |
---|---|
date | Wed, 11 Nov 2015 23:34:43 +0000 |
parents | 52325cb524a8 |
children | e1379873c398 |
files | g23m/condat/com/src/driver/display.c |
diffstat | 1 files changed, 32 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/g23m/condat/com/src/driver/display.c Thu Nov 05 08:09:54 2015 +0000 +++ b/g23m/condat/com/src/driver/display.c Wed Nov 11 23:34:43 2015 +0000 @@ -129,26 +129,26 @@ /************************************************************************ * The following macros define what hardware we are running on and what * -* drivers are being used to drive the display * -* BSAMPLE - 84x48 display * -* CSAMPLE - 84x48 display * -* CSAMPLE_COLOUR - no longer supported * +* drivers are being used to drive the display * +* BSAMPLE - 84x48 display * +* CSAMPLE - 84x48 display * +* CSAMPLE_COLOUR - no longer supported * * DSAMPLE - 176x220 display which can be driven as 16 bit colour or b+w * -* DSAMPLE_COLOUR - colour display * -* DSAMPLE_COLOUR16 - 16 bits per pixel displayed * +* DSAMPLE_COLOUR - colour display * +* DSAMPLE_COLOUR16 - 16 bits per pixel displayed * * NB. This has not been tested at all - it * * may not display correctly or may crash * * although it does not crash when enabled * * with the 32bit drivers) * * * * DSAMPLE_COLOUR32 - 32 bits per pixel displayed (16 bits are * -* zero and have no effect) * +* zero and have no effect) * * DSAMPLE_LITE - 1 bit per pixel (b+w display) * -* GW SPR#1840 25/03/03 * +* GW SPR#1840 25/03/03 * * Also, the compiler switches have been added to allow us to develop * -* the MMI for a different final format (b+w/smaller display). * -* COLOURDISPLAY - If not defined - all output is to be b+w * -* LSCREEN - If not defined - screen is 'small' - use the 8x6 font * +* the MMI for a different final format (b+w/smaller display). * +* COLOURDISPLAY - If not defined - all output is to be b+w * +* LSCREEN - If not defined - screen is 'small' - use the 8x6 font * *************************************************************************/ #if (defined(_TARGET_)) //#if (BOARD==33) @@ -230,11 +230,18 @@ */ /* + * FreeCalypso: reconstructing bitrotten C-Sample display config for C139 + */ +#define CSAMPLE_NEWSTYLE + +#if 0 +/* * C139: we have to use the USE_PLOT configuration for now, * as the other is bitrotten: r2d_fast_blit() is gone. */ #define USE_PLOT 1 #define MAX_NUMBER_PLOTS 84*48 +#endif /*==== CONSTANTS ==================================================*/ // Mar 30, 2005 REF: CRR 29986 xpradipg @@ -1959,10 +1966,12 @@ #ifdef CSAMPLE #define HEADER_INFO (3) #define DISPLAY_SIZE (LCD_COL*LCD_COL_NUM_LWORDS) +#ifdef CSAMPLE_OLDSTYLE static UINT32 display_bw [DISPLAY_SIZE+HEADER_INFO+10]; #ifdef USE_PLOT static UINT32 displayCopy_bw [DISPLAY_SIZE+HEADER_INFO+1]; /* copy to flag differences */ #endif +#endif static UINT32* picture_bw=NULL;//Pointer to data in display. static UINT32* pictureCopy_bw= NULL;//Pointer to data in display. /* static char scratch [100]; */ /* command buffer - does not support output of new display */ @@ -2529,7 +2538,7 @@ //Initialises data required for bolck copy of a 'picture' void scrRivPictureClear(void) { -#ifdef CSAMPLE +#ifdef CSAMPLE_OLDSTYLE memset(display_bw,0,sizeof(display_bw)); #ifdef USE_PLOT memset(displayCopy_bw,0,sizeof(displayCopy_bw)); @@ -2601,7 +2610,7 @@ #endif -#ifdef DSAMPLE_LITE +#if defined(DSAMPLE_LITE) || defined(CSAMPLE_NEWSTYLE) picture_bw = r2d_get_pixmap(r2d_g_lcd_gc); memset(picture_bw,0,DISPLAY_SIZE*4); #endif @@ -2623,7 +2632,7 @@ scrRivPictureClear(); #endif -#ifdef CSAMPLE +#ifdef CSAMPLE_OLDSTYLE strcpy(mb_name, "FRED"); mb_param.size = 256; mb_param.watermark = 128; @@ -2904,7 +2913,7 @@ -#ifdef CSAMPLE +#ifdef CSAMPLE_OLDSTYLE void scrLCDUpdate (void) { int kstart,kend,k; @@ -2973,6 +2982,14 @@ } #endif //CSAMPLE +#ifdef CSAMPLE_NEWSTYLE +void scrLCDUpdate (void) +{ + if (scrEnabled) + r2d_flush(); +} +#endif + //June 03, 2005 REF: GSM-ENH-31636 xpradipg //CRR 28825: xpradipg - 11 Feb 2005 #if (defined(DSAMPLE) || defined(ESAMPLE) || defined(ISAMPLE) || defined(CALLISTO))// changes for flag cleanup and addition for ISAMPLE