aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/ports/AVR/compilers
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-04-16 16:12:51 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-04-16 16:12:51 +0000
commitd57f92801471b1337ed49d989026e1c212cdfc73 (patch)
tree53a02411539973d50e5504c25a050d383116f5b0 /os/common/ports/AVR/compilers
parent9d3bca73d4fa4cf5543c68902dfc6e589c7d7bb2 (diff)
downloadChibiOS-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/AVR/compilers')
-rw-r--r--os/common/ports/AVR/compilers/GCC/chtypes.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/os/common/ports/AVR/compilers/GCC/chtypes.h b/os/common/ports/AVR/compilers/GCC/chtypes.h
index 8222a3f8e..91215dde7 100644
--- a/os/common/ports/AVR/compilers/GCC/chtypes.h
+++ b/os/common/ports/AVR/compilers/GCC/chtypes.h
@@ -74,14 +74,14 @@ typedef uint8_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.
*/
-#define NOINLINE __attribute__((noinline))
+#define NOINLINE __attribute__((noinline))
/**
* @brief Optimized thread function declaration macro.
@@ -91,12 +91,24 @@ typedef uint8_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 2
+
+/**
+ * @brief True if alignment is low-high in current architecture.
+ */
+#define REVERSE_ORDER 1
#endif /* CHTYPES_H */