mirror of
https://github.com/apache/nuttx.git
synced 2026-10-12 00:30:23 +00:00
nuttx: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
df102d1f06
commit
eca4951021
1 changed files with 3 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue