From 3f03c0c1edc74b3fb95f178a45a111a2d3381719 Mon Sep 17 00:00:00 2001 From: Michael Hope Date: Wed, 31 Aug 2011 20:45:44 +1200 Subject: Added more doxygen file level headers. Documented a few more functions. Signed-off-by: Michael Hope --- libmaple/util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libmaple/util.h') diff --git a/libmaple/util.h b/libmaple/util.h index 080f1bf..7b41769 100644 --- a/libmaple/util.h +++ b/libmaple/util.h @@ -42,10 +42,13 @@ extern "C"{ * Bit manipulation */ +/** 1 << the bit number */ #define BIT(shift) (1UL << (shift)) +/** Mask shifted left by 'shift' */ #define BIT_MASK_SHIFT(mask, shift) ((mask) << (shift)) /** Bits m to n of x */ #define GET_BITS(x, m, n) ((((uint32)x) << (31 - (n))) >> ((31 - (n)) + (m))) +/** True if v is a power of two (1, 2, 4, 8, ...) */ #define IS_POWER_OF_TWO(v) ((v) && !((v) & ((v) - 1))) /* -- cgit v1.2.3