nuttx: unify MIN, MAX and ABS macro definition across the code

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko
2022-12-21 00:52:30 +02:00
committed by Xiang Xiao
parent 72fdea5c13
commit b107e4f417
54 changed files with 159 additions and 145 deletions
@@ -71,11 +71,11 @@
/* The ever-present MIN/MAX macros ******************************************/
#ifndef MIN
# define MIN(a,b) (a < b ? a : b)
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a,b) (a > b ? a : b)
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
/* LCD **********************************************************************/
@@ -99,10 +99,11 @@
/* Miscellaneous Definitions ************************************************/
#ifndef MIN
# define MIN(a,b) (a < b ? a : b)
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a,b) (a > b ? a : b)
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
#define MIN_BUTTON MIN(CONFIG_PM_BUTTONS_MIN, CONFIG_PM_IRQBUTTONS_MIN)
@@ -74,11 +74,11 @@
/* The ever-present MIN/MAX macros ******************************************/
#ifndef MIN
# define MIN(a,b) (a < b ? a : b)
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a,b) (a > b ? a : b)
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
/* LCD **********************************************************************/