From: aleph Date: Thu, 20 Jan 2005 18:46:04 +0000 (+0000) Subject: Add progmem datatypes; PSTR() definition. X-Git-Tag: 1.0.0~900 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=6f109b7b3511411231a36425dd3aade65c68de1d;hp=8940ced6ca2c4d2efb74cbdbfbdd033e0adf9200;p=bertos.git Add progmem datatypes; PSTR() definition. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@341 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/compiler.h b/compiler.h index 729888c2..cfde7082 100755 --- a/compiler.h +++ b/compiler.h @@ -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. *#* @@ -254,6 +257,7 @@ #else /* We still need this for prototypes */ #define PROGMEM __attribute__((__progmem__)) + #define PSTR(s) ({static char __c[] PROGMEM = (s); __c;}) #endif #endif @@ -429,6 +433,17 @@ #include #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 /*