summaryrefslogtreecommitdiff
path: root/firmware/system.h
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2002-05-24 12:21:51 +0000
committerBjörn Stenberg <bjorn@haxx.se>2002-05-24 12:21:51 +0000
commitffb6a9db8e1aeef43306e5f0c83c1547bd82546b (patch)
treefade6d8dfe5002ba92b6e061b91ec0098bec64d2 /firmware/system.h
parent87567da801f9b9ff5bfc387b0dc219ffdb6538fe (diff)
Added NULL, MIN and MAX
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@694 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/system.h')
-rw-r--r--firmware/system.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/system.h b/firmware/system.h
index 9b1df03217..fdc472f5e2 100644
--- a/firmware/system.h
+++ b/firmware/system.h
@@ -25,6 +25,18 @@
#define FREQ 12000000 /* cycle time ~83.3ns */
#define BAUDRATE 9600
+#ifndef NULL
+#define NULL ((void*)0)
+#endif
+
+#ifndef MIN
+#define MIN(a, b) (((a)<(b))?(a):(b))
+#endif
+
+#ifndef MAX
+#define MAX(a, b) MIN(b,a)
+#endif
+
#ifdef LITTLE_ENDIAN
#define SWAB16(x) (x)
#define SWAB32(x) (x)