From 1546e0f71c9705569ad5589151e9f9eba521d3eb Mon Sep 17 00:00:00 2001 From: aleph Date: Thu, 20 Jan 2005 18:46:31 +0000 Subject: [PATCH] Fix progmem includes. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@342 38d2e660-2303-0410-9eaa-f027e97ec537 --- mware/gfx.h | 13 ++++++++----- mware/text.c | 17 +++++------------ 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/mware/gfx.h b/mware/gfx.h index b2804157..427063a1 100755 --- a/mware/gfx.h +++ b/mware/gfx.h @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* Revision 1.9 2005/01/20 18:46:31 aleph + *#* Fix progmem includes. + *#* *#* Revision 1.8 2004/11/01 15:14:07 bernie *#* Update to current coding conventions. *#* @@ -39,8 +42,9 @@ #ifndef MWARE_GFX_H #define MWARE_GFX_H -#include #include +#include +#include /*! Common type for coordinates expressed in pixel units */ @@ -91,10 +95,9 @@ extern void gfx_moveTo (Bitmap *bm, coord_t x, coord_t y); extern void gfx_lineTo (Bitmap *bm, coord_t x, coord_t y); extern void gfx_setClipRect(Bitmap *bm, coord_t xmin, coord_t ymin, coord_t xmax, coord_t ymax); -#if CPU_AVR - #include - extern void gfx_blit_P(Bitmap *bm, const prog_uchar *raster); -#endif /* CPU_AVR */ +#if CPU_HARVARD + extern void gfx_blit_P(Bitmap *bm, const pgm_uint8_t *raster); +#endif #if CONFIG_GFX_VCOORDS diff --git a/mware/text.c b/mware/text.c index 5def533f..69211911 100755 --- a/mware/text.c +++ b/mware/text.c @@ -15,6 +15,9 @@ /*#* *#* $Log$ + *#* Revision 1.11 2005/01/20 18:46:31 aleph + *#* Fix progmem includes. + *#* *#* Revision 1.10 2005/01/08 09:20:12 bernie *#* Really make it work on both architectures. *#* @@ -156,11 +159,7 @@ static int text_putglyph(char c, struct Bitmap *bm) /* Per ogni colonna di dot del glyph... */ for (i = 0; i < glyph_width; ++i) { - #if CPU_HARVARD - dots = PGM_READ_CHAR(glyph); - #else - dots = *glyph; - #endif + dots = PGM_READ_CHAR(glyph); /* Advance to next column in glyph. * Expand: advances only once every two columns @@ -198,13 +197,7 @@ static int text_putglyph(char c, struct Bitmap *bm) } else /* No style: fast vanilla copy of glyph to line buffer */ while (glyph_width--) - { - #if CPU_HARVARD - *buf++ = PGM_READ_CHAR(glyph++); - #else - *buf++ = *glyph++; - #endif - } + *buf++ = PGM_READ_CHAR(glyph++); return c; } -- 2.25.1