diff options
author | Leo C | 2015-04-23 02:28:53 +0200 |
---|---|---|
committer | Leo C | 2015-04-23 02:28:53 +0200 |
commit | d264541a3e7fe756695f811136d7a89e8e7ec478 (patch) | |
tree | 8e5291b6578dc4b1d543210c6446d3e97c06f1e1 /include | |
parent | 31033ab3f82c4d00e12fb72a65c2ba614da8ad2f (diff) | |
download | z180-stamp-d264541a3e7fe756695f811136d7a89e8e7ec478.zip |
loadi seems to work now.hexrel-5
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 6 |
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 |