2020-02-10 22:38:24 +01:00
|
|
|
#ifndef __HELPER_MACROS_H__
|
|
|
|
#define __HELPER_MACROS_H__
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
#define xstr(x) str(x)
|
|
|
|
#define str(x) #x
|
|
|
|
|
|
|
|
#define CONCATX(x,y) CONCAT(x,y)
|
|
|
|
#define CONCAT(x,y) x##y
|
|
|
|
|
|
|
|
#define COUNT_OF(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
|
|
|
|
|
2020-02-15 17:53:15 +01:00
|
|
|
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
|
|
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
|
|
|
2020-02-10 22:38:24 +01:00
|
|
|
#endif /* __HELPER_MACROS_H__ */
|