+/*!
+ * \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
+ /*
+ * The ATmega8 has a very small Flash, so we can't afford
+ * to link in support routines for 32bit integer arithmetic.
+ */
+ typedef int16_t mtime_t; /*!< Type for time expressed in milliseconds. */
+ typedef int16_t utime_t; /*!< Type for time expressed in microseconds. */
+ #define SIZEOF_MTIME_T (16 / CPU_BITS_PER_CHAR)
+ #define SIZEOF_UTIME_T (16 / CPU_BITS_PER_CHAR)
+ #define MTIME_INFINITE 0x7FFFL
+#else
+ typedef int32_t mtime_t; /*!< Type for time expressed in milliseconds. */
+ typedef int32_t utime_t; /*!< Type for time expressed in microseconds. */
+ #define SIZEOF_MTIME_T (32 / CPU_BITS_PER_CHAR)
+ #define SIZEOF_UTIME_T (32 / CPU_BITS_PER_CHAR)
+ #define MTIME_INFINITE 0x7FFFFFFFL
+#endif
+
+/*! Bulk storage large enough for both pointers or integers. */
+typedef void * iptr_t;
+typedef const void * const_iptr_t;
+
+typedef unsigned char sig_t; /*!< Type for signal bits. */
+typedef unsigned char sigmask_t; /*!< Type for signal masks. */
+typedef unsigned char page_t; /*!< Type for banked memory pages. */
+
+
+/*!
+ * \name Standard type definitions.
+ *
+ * These should be in <sys/types.h>, but many compilers lack them.
+ *
+ * \{
+ */
+#if !(defined(size_t) || defined(_SIZE_T_DEFINED))
+ #if CPU_REG_BITS > 32
+ /* 64bit. */
+ typedef unsigned long size_t;
+ typedef long ssize_t;
+ #else
+ /* 32bit or 16bit. */
+ typedef unsigned int size_t;
+ typedef int ssize_t;
+ #endif
+#endif
+
+#if !(defined(_TIME_T_DEFINED) || defined(__time_t_defined) || defined(_EMUL))
+ /*! For backwards compatibility. Use mtime_t in new code. */
+ #define time_t mtime_t
+ #define SIZEOF_TIME_T SIZEOF_MTIME_T
+#else
+ /* Just a guess, but quite safe. */
+ #define SIZEOF_TIME_T SIZEOF_LONG
+#endif /* _TIME_T_DEFINED || __time_t_defined */
+/*\}*/
+
+