usbloadergx/source/utils/tools.h

10 lines
243 B
C
Raw Normal View History

#ifndef TOOLS_H_
#define TOOLS_H_
#define ABS(x) ( (x) >= (0) ? (x) : (-(x)) )
#define LIMIT(x, min, max) ( ((x) < (min)) ? (min) : ((x) > (max)) ? (max) : (x) )
#define ALIGN(x) (((x) + 3) & ~3)
#define ALIGN32(x) (((x) + 31) & ~31)
#endif