Add progmem datatypes; PSTR() definition.
authoraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 20 Jan 2005 18:46:04 +0000 (18:46 +0000)
committeraleph <aleph@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 20 Jan 2005 18:46:04 +0000 (18:46 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@341 38d2e660-2303-0410-9eaa-f027e97ec537

compiler.h

index 729888c2348d9d61966cfb7e31b9b62f64c10b96..cfde70820895faeb4ce9ba858a90052720afbc6e 100755 (executable)
@@ -14,6 +14,9 @@
 
 /*#*
  *#* $Log$
+ *#* Revision 1.40  2005/01/20 18:46:04  aleph
+ *#* Add progmem datatypes; PSTR() definition.
+ *#*
  *#* Revision 1.39  2005/01/08 08:49:39  bernie
  *#* Define PROGMEM on AVR only when not including pgmspace.h.
  *#*
                #else
                        /* We still need this for prototypes */
                        #define PROGMEM  __attribute__((__progmem__))
+                       #define PSTR(s) ({static char __c[] PROGMEM = (s); __c;})
                #endif
 
        #endif
        #include <stdint.h>
 #endif
 
+/*!
+ * \name Types for variables stored in program memory (harvard processors).
+ * \{
+ */
+typedef PROGMEM int8_t pgm_int8_t;
+typedef PROGMEM uint8_t pgm_uint8_t;
+typedef PROGMEM int16_t pgm_int16_t;
+typedef PROGMEM uint16_t pgm_uint16_t;
+typedef PROGMEM int32_t pgm_int32_t;
+typedef PROGMEM uint32_t pgm_uint32_t;
+/*\}*/
 
 #if CPU_AVR_ATMEGA8
        /*