diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-04-16 16:12:51 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-04-16 16:12:51 +0000 |
commit | d57f92801471b1337ed49d989026e1c212cdfc73 (patch) | |
tree | 53a02411539973d50e5504c25a050d383116f5b0 /os/common/ports/e200/compilers | |
parent | 9d3bca73d4fa4cf5543c68902dfc6e589c7d7bb2 (diff) | |
download | ChibiOS-d57f92801471b1337ed49d989026e1c212cdfc73.tar.gz ChibiOS-d57f92801471b1337ed49d989026e1c212cdfc73.tar.bz2 ChibiOS-d57f92801471b1337ed49d989026e1c212cdfc73.zip |
More infos in chtypes.h.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9292 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/ports/e200/compilers')
-rw-r--r-- | os/common/ports/e200/compilers/CW/chtypes.h | 24 | ||||
-rw-r--r-- | os/common/ports/e200/compilers/GCC/chtypes.h | 24 |
2 files changed, 36 insertions, 12 deletions
diff --git a/os/common/ports/e200/compilers/CW/chtypes.h b/os/common/ports/e200/compilers/CW/chtypes.h index f8e6f2691..b2c55a5eb 100644 --- a/os/common/ports/e200/compilers/CW/chtypes.h +++ b/os/common/ports/e200/compilers/CW/chtypes.h @@ -74,14 +74,14 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */ * @brief ROM constant modifier.
* @note It is set to use the "const" keyword in this port.
*/
-#define ROMCONST const
+#define ROMCONST const
/**
* @brief Makes functions not inlineable.
- * @note If the compiler does not support such attribute then the
- * realtime counter precision could be degraded.
+ * @note If the compiler does not support such attribute then some
+ * time-dependent services could be degraded.
*/
-#define NOINLINE __attribute__((noinline))
+#define NOINLINE __attribute__((noinline))
/**
* @brief Optimized thread function declaration macro.
@@ -91,12 +91,24 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */ /**
* @brief Packed variable specifier.
*/
-#define PACKED_VAR __attribute__((packed))
+#define PACKED_VAR __attribute__((packed))
/**
* @brief Memory alignment enforcement for variables.
*/
-#define ALIGNED_VAR(n) __attribute__((aligned(n)))
+#define ALIGNED_VAR(n) __attribute__((aligned(n)))
+
+/**
+ * @brief Size of a pointer.
+ * @note To be used where the sizeof operator cannot be used, preprocessor
+ * expressions for example.
+ */
+#define SIZEOF_PTR 4
+
+/**
+ * @brief True if alignment is low-high in current architecture.
+ */
+#define REVERSE_ORDER 0
#endif /* CHTYPES_H */
diff --git a/os/common/ports/e200/compilers/GCC/chtypes.h b/os/common/ports/e200/compilers/GCC/chtypes.h index 124874850..20a601e93 100644 --- a/os/common/ports/e200/compilers/GCC/chtypes.h +++ b/os/common/ports/e200/compilers/GCC/chtypes.h @@ -74,14 +74,14 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */ * @brief ROM constant modifier.
* @note It is set to use the "const" keyword in this port.
*/
-#define ROMCONST const
+#define ROMCONST const
/**
* @brief Makes functions not inlineable.
- * @note If the compiler does not support such attribute then the
- * realtime counter precision could be degraded.
+ * @note If the compiler does not support such attribute then some
+ * time-dependent services could be degraded.
*/
-#define NOINLINE __attribute__((noinline))
+#define NOINLINE __attribute__((noinline))
/**
* @brief Optimized thread function declaration macro.
@@ -91,12 +91,24 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */ /**
* @brief Packed variable specifier.
*/
-#define PACKED_VAR __attribute__((packed))
+#define PACKED_VAR __attribute__((packed))
/**
* @brief Memory alignment enforcement for variables.
*/
-#define ALIGNED_VAR(n) __attribute__((aligned(n)))
+#define ALIGNED_VAR(n) __attribute__((aligned(n)))
+
+/**
+ * @brief Size of a pointer.
+ * @note To be used where the sizeof operator cannot be used, preprocessor
+ * expressions for example.
+ */
+#define SIZEOF_PTR 4
+
+/**
+ * @brief True if alignment is low-high in current architecture.
+ */
+#define REVERSE_ORDER 0
#endif /* CHTYPES_H */
|