projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix msp430 cpu core name. Add new msp430 core detect.
[bertos.git]
/
bertos
/
cfg
/
macros.h
diff --git
a/bertos/cfg/macros.h
b/bertos/cfg/macros.h
index caa2340f4792bedae0214eabbeb94b3bd73bea68..3ec6b277e51f320f87937098c1a88094ce965a1d 100644
(file)
--- a/
bertos/cfg/macros.h
+++ b/
bertos/cfg/macros.h
@@
-32,7
+32,6
@@
*
* \brief Common and handy function macros
*
*
* \brief Common and handy function macros
*
- * \version $Id$
* \author Bernie Innocenti <bernie@codewiz.org>
* \author Giovanni Bajo <rasky@develer.com>
*/
* \author Bernie Innocenti <bernie@codewiz.org>
* \author Giovanni Bajo <rasky@develer.com>
*/
@@
-95,6
+94,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))