nuttx: Use MIN/MAX definitions from "sys/param.h"

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei
2023-02-01 10:41:12 -03:00
committed by Xiang Xiao
parent 079e2b8c7c
commit e6b204f438
179 changed files with 195 additions and 1304 deletions
+1 -12
View File
@@ -28,6 +28,7 @@
#include <nuttx/config.h>
#include <stdint.h>
#include <sys/param.h>
#include <nuttx/usb/usbdev.h>
#include <nuttx/usb/cdc.h>
@@ -165,18 +166,6 @@
#define CDCACM_DEVNAME_FORMAT "/dev/ttyACM%d"
#define CDCACM_DEVNAME_SIZE 16
/* Misc Macros **************************************************************/
/* MIN/MAX macros */
#ifndef MIN
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
/* Trace values *************************************************************/
#define CDCACM_CLASSAPI_SETUP TRACE_EVENT(TRACE_CLASSAPI_ID, USBSER_TRACECLASSAPI_SETUP)
+1 -4
View File
@@ -28,6 +28,7 @@
#include <nuttx/config.h>
#include <stdio.h>
#include <sys/param.h>
#include <nuttx/usb/cdcecm.h>
@@ -57,8 +58,4 @@
#define CDCECM_SELFPOWERED (0)
#define CDCECM_REMOTEWAKEUP (0)
#ifndef MIN
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#endif /* __DRIVERS_USBDEV_CDCECM_H */
+1 -10
View File
@@ -27,6 +27,7 @@
#include <nuttx/config.h>
#include <sys/param.h>
#include <sys/types.h>
#include <stdint.h>
@@ -114,16 +115,6 @@
#define COMPOSITE_SERIALSTRID (3)
#define COMPOSITE_CONFIGSTRID (4)
/* Everpresent MIN/MAX macros ***********************************************/
#ifndef MIN
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
/****************************************************************************
* Public Types
****************************************************************************/
+1 -10
View File
@@ -29,6 +29,7 @@
#include <nuttx/config.h>
#include <sys/param.h>
#include <sys/types.h>
#include <stdint.h>
#include <stdbool.h>
@@ -334,16 +335,6 @@
#define USBMSC_DRVR_GEOMETRY(l,g) \
((l)->inode->u.i_bops->geometry((l)->inode,g))
/* Everpresent MIN/MAX macros ***********************************************/
#ifndef MIN
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
/****************************************************************************
* Public Types
****************************************************************************/