mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 12:33:27 +08:00
nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -27,6 +27,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
typedef signed char int8; /* !< Signed 8 bit integer */
|
||||
typedef unsigned char uint8; /* !< Unsigned 8 bit integer */
|
||||
|
||||
@@ -61,14 +64,6 @@ typedef uint8 halDataAlign_t; /* !< Used for byte alignment */
|
||||
#define BF(x,b,s) (((x) & (b)) >> (s))
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(n,m) (((n) < (m)) ? (n) : (m))
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(n,m) (((n) < (m)) ? (m) : (n))
|
||||
#endif
|
||||
|
||||
#ifndef ABS
|
||||
#define ABS(n) (((n) < 0) ? -(n) : (n))
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user