projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix naming conventions.
[bertos.git]
/
mware
/
pgm.h
diff --git
a/mware/pgm.h
b/mware/pgm.h
index cb81e54813634c9d8af8da6f5e363e0e68260be1..4bd1018c451f7020f598f2800b6f812698591795 100755
(executable)
--- a/
mware/pgm.h
+++ b/
mware/pgm.h
@@
-76,7
+76,8
@@
})
})
- #else
+ #else /* !__AVR_ENHANCED__ */
+
#define pgm_read_char(addr) \
({ \
uint16_t __addr16 = (uint16_t)(addr); \
#define pgm_read_char(addr) \
({ \
uint16_t __addr16 = (uint16_t)(addr); \
@@
-135,6
+136,12
@@
__result; \
})
__result; \
})
+ #endif /* !__AVR_ENHANCED__ */
+
+ #if SIZEOF_INT == 2
+ #define pgm_read_int(addr) ((int)pgm_read_uint16_t(addr))
+ #else
+ #error Missing support for CPU word size != 16bit
#endif
#ifndef PROGMEM
#endif
#ifndef PROGMEM
@@
-153,7
+160,7
@@
#endif
#ifndef PROGMEM
#endif
#ifndef PROGMEM
-#define PROGMEM
/* nothing */
+#define PROGMEM /* nothing */
#endif
/*!
#endif
/*!
@@
-203,12
+210,12
@@
typedef PROGMEM uint32_t pgm_uint32_t;
#ifdef _PROGMEM
#define PGM_READ_CHAR(s) pgm_read_char(s)
#define PGM_FUNC(x) x ## _P
#ifdef _PROGMEM
#define PGM_READ_CHAR(s) pgm_read_char(s)
#define PGM_FUNC(x) x ## _P
- #define PGM_STR(x) PSTR(x)
+ #define PGM_STR(x) PSTR(x)
#define PGM_ATTR PROGMEM
#else
#define PGM_READ_CHAR(s) (*(s))
#define PGM_FUNC(x) x
#define PGM_ATTR PROGMEM
#else
#define PGM_READ_CHAR(s) (*(s))
#define PGM_FUNC(x) x
- #define PGM_STR(x) x
+ #define PGM_STR(x) x
#define PGM_ATTR /* nothing */
#endif
/* \} */
#define PGM_ATTR /* nothing */
#endif
/* \} */