From d57f92801471b1337ed49d989026e1c212cdfc73 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 16 Apr 2016 16:12:51 +0000 Subject: More infos in chtypes.h. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9292 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/ports/e200/compilers/CW/chtypes.h | 24 ++++++++++++++++++------ os/common/ports/e200/compilers/GCC/chtypes.h | 24 ++++++++++++++++++------ 2 files changed, 36 insertions(+), 12 deletions(-) (limited to 'os/common/ports/e200/compilers') 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 */ -- cgit v1.2.3