summaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorLeo C2015-04-23 02:28:53 +0200
committerLeo C2015-04-23 02:28:53 +0200
commitd264541a3e7fe756695f811136d7a89e8e7ec478 (patch)
tree8e5291b6578dc4b1d543210c6446d3e97c06f1e1 /include/common.h
parent31033ab3f82c4d00e12fb72a65c2ba614da8ad2f (diff)
downloadz180-stamp-d264541a3e7fe756695f811136d7a89e8e7ec478.zip
loadi seems to work now.hexrel-5
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index cfbbae5..10c4417 100644
--- a/include/common.h
+++ b/include/common.h
@@ -52,6 +52,12 @@ struct bits {
#define FSTR(X) ((const FLASH char[]) { X } )
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#define MIN(a,b) ({ typeof (a) _a = (a); \
+ typeof (b) _b = (b); \
+ _a < _b ? _a : _b; })
+#define MAX(a,b) ({ typeof (a) _a = (a); \
+ typeof (b) _b = (b); \
+ _a > _b ? _a : _b; })
#ifdef __AVR__
#define Stat GPIOR0