From 6f109b7b3511411231a36425dd3aade65c68de1d Mon Sep 17 00:00:00 2001 From: aleph Date: Thu, 20 Jan 2005 18:46:04 +0000 Subject: [PATCH] Add progmem datatypes; PSTR() definition. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@341 38d2e660-2303-0410-9eaa-f027e97ec537 --- compiler.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 /* -- 2.25.1