projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove arduino preset from night_test awaiting the avr toolchain updates on building...
[bertos.git]
/
bertos
/
cfg
/
macros.h
diff --git
a/bertos/cfg/macros.h
b/bertos/cfg/macros.h
index d0ccf433b23321158bc043d1673c6732e4ebac93..0a721ac5a060f703d00a594ed9ab7cad25ae926e 100644
(file)
--- a/
bertos/cfg/macros.h
+++ b/
bertos/cfg/macros.h
@@
-30,6
+30,10
@@
*
* -->
*
*
* -->
*
+ * \defgroup macros General purpose macros
+ * \ingroup core
+ * \{
+ *
* \brief Common and handy function macros
*
* \author Bernie Innocenti <bernie@codewiz.org>
* \brief Common and handy function macros
*
* \author Bernie Innocenti <bernie@codewiz.org>
@@
-94,6
+98,11
@@
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif /* !(COMPILER_STATEMENT_EXPRESSIONS && COMPILER_TYPEOF) */
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif /* !(COMPILER_STATEMENT_EXPRESSIONS && COMPILER_TYPEOF) */
+/** Align \p value to the next \p align boundary */
+#define ALIGN_UP(value, align) (((value) & ((align) - 1)) ? \
+ (((value) + ((align) - 1)) & ~((align) - 1)) : \
+ (value))
+
/** Bound \a x between \a min and \a max. */
#define MINMAX(min,x,max) (MIN(MAX(min, x), max))
/** Bound \a x between \a min and \a max. */
#define MINMAX(min,x,max) (MIN(MAX(min, x), max))
@@
-354,5
+363,7
@@
*/
typedef uint32_t id_t;
*/
typedef uint32_t id_t;
+/** \} */ //defgroup macros
+
#endif /* MACROS_H */
#endif /* MACROS_H */