*
* -->
*
+ * \defgroup macros General purpose macros
+ * \ingroup core
+ * \{
+ *
* \brief Common and handy function macros
*
* \author Bernie Innocenti <bernie@codewiz.org>
#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))
*/
typedef uint32_t id_t;
+/** \} */ //defgroup macros
+
#endif /* MACROS_H */