Commit f2f9f3fc authored by Oliver Horst's avatar Oliver Horst
Browse files

[add] max macro

parent 73900087
......@@ -7,6 +7,11 @@
__typeof__ (b) _b = (b); \
_a < _b ? _a : _b; } )
#define max( a, b ) \
( { __typeof__ (a) _a = (a); \
__typeof__ (b) _b = (b); \
_a > _b ? _a : _b; } )
/* Unsigned ceiling function */
#define uceil(X) ( ( X-(uint32_t)( X ) ) > 0 ? (uint32_t)( X+1 ) : (uint32_t)( X ) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment