aboutsummaryrefslogtreecommitdiffstats
path: root/arduino/cores/nRF5/Arduino.h
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2019-03-14 14:44:18 -0400
committerClyne Sullivan <tullivan99@gmail.com>2019-03-14 14:44:18 -0400
commit352e0df7d800b033ce24ad1022461f5d1908da93 (patch)
tree3cf6adf03311668fe3ecbbb21c070668624fa10a /arduino/cores/nRF5/Arduino.h
parent31e115f7e72532fbfd456709e95d440e3be46fa1 (diff)
cleanup, display screen abstraction
Diffstat (limited to 'arduino/cores/nRF5/Arduino.h')
-rwxr-xr-xarduino/cores/nRF5/Arduino.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arduino/cores/nRF5/Arduino.h b/arduino/cores/nRF5/Arduino.h
index fb06853..b77a872 100755
--- a/arduino/cores/nRF5/Arduino.h
+++ b/arduino/cores/nRF5/Arduino.h
@@ -86,6 +86,7 @@ uint32_t setLoopStacksize(void);
#include "wiring_shift.h"
#include "WInterrupts.h"
+#ifndef __cplusplus
// undefine stdlib's abs if encountered
#ifdef abs
#undef abs
@@ -94,6 +95,8 @@ uint32_t setLoopStacksize(void);
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define abs(x) ((x)>0?(x):-(x))
+#endif // __cplusplus
+
#define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
#define round(x) ((x)>=0?(long)((x)+0.5):(long)((x)-0.5))
#define radians(deg) ((deg)*DEG_TO_RAD)