Fix progmem includes.
authoraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 20 Jan 2005 18:46:31 +0000 (18:46 +0000)
committeraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 20 Jan 2005 18:46:31 +0000 (18:46 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@342 38d2e660-2303-0410-9eaa-f027e97ec537

mware/gfx.h
mware/text.c

index b2804157cb0a605fdcc1412e8470b780b5364e6a..427063a1b906c5667d28f3f776b7680b1882189e 100755 (executable)
@@ -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 <compiler.h>
 #include <config.h>
+#include <compiler.h>
+#include <cpu.h>
 
 
 /*! 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 <avr/pgmspace.h>
-       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
index 5def533fa011ee6ad51089fb9ee5ecf607043354..692119119b32f29f444af74ea7594be07551cb0e 100755 (executable)
@@ -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;
 }