diff --git a/util.h b/util.h index 6e5d4e0845..85961e64d7 100644 --- a/util.h +++ b/util.h @@ -26,7 +26,7 @@ #include // Statement expressions make these macros side-effect safe -#define MIN(a, b) ({ typeof(a) _a = (a); typeof(b) _b = (b); _a > _b ? _a : _b; }) +#define MIN(a, b) ({ typeof(a) _a = (a); typeof(b) _b = (b); _a < _b ? _a : _b; }) #define MAX(a, b) ({ typeof(a) _a = (a); typeof(b) _b = (b); _a > _b ? _a : _b; }) void delay(uint32_t wait);