mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
committed by
Xiang Xiao
parent
079e2b8c7c
commit
e6b204f438
+1
-12
@@ -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)
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
@@ -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
|
||||
****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user